Disable compile_xcassets on macOS.

xcassets are only used on iOS, not macOS. We want to minimize the number of
Xcode-based tools used by the macOS toolchain, so we intentionally disallow
future uses of xcassets on macOS.

Change-Id: Id559f84633be6c935211561b976a7991810d94ad
Bug: 965663
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1643406
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#666695}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6c478646f25b58fe24c885b76f3f3e5c0a0fcd51
This commit is contained in:
Erik Chen 2019-06-06 14:39:34 +00:00 коммит произвёл Commit Bot
Родитель be8923dd25
Коммит 8c4847774e
1 изменённых файлов: 26 добавлений и 20 удалений

Просмотреть файл

@ -440,27 +440,33 @@ template("mac_toolchain") {
description = "COPY_BUNDLE_DATA {{source}} {{output}}"
pool = ":bundle_pool($default_toolchain)"
}
tool("compile_xcassets") {
_tool = rebase_path("//build/toolchain/mac/compile_xcassets.py",
root_build_dir)
if (is_ios) {
_sdk_name = ios_sdk_name
_min_deployment_target = ios_deployment_target
_compress_pngs = ""
} else {
_sdk_name = mac_sdk_name
_min_deployment_target = mac_deployment_target
_compress_pngs = " -c "
}
command =
"$env_wrapper rm -f \"{{output}}\" && " +
"TOOL_VERSION=${tool_versions.compile_xcassets} " +
"python $_tool$_compress_pngs -p \"$_sdk_name\" " +
"-t \"$_min_deployment_target\" -T \"{{bundle_product_type}}\" " +
"-P \"{{bundle_partial_info_plist}}\" -o {{output}} {{inputs}}"
description = "COMPILE_XCASSETS {{output}}"
pool = ":bundle_pool($default_toolchain)"
# xcassets are only used on iOS, not macOS. We want to minimize the number
# of Xcode-based tools used by the macOS toolchain, so we intentionally
# disallow future uses of xcassets on macOS. https://crbug.com/965663.
if (toolchain_args.current_os == "ios") {
tool("compile_xcassets") {
_tool = rebase_path("//build/toolchain/mac/compile_xcassets.py",
root_build_dir)
if (is_ios) {
_sdk_name = ios_sdk_name
_min_deployment_target = ios_deployment_target
_compress_pngs = ""
} else {
_sdk_name = mac_sdk_name
_min_deployment_target = mac_deployment_target
_compress_pngs = " -c "
}
command =
"$env_wrapper rm -f \"{{output}}\" && " +
"TOOL_VERSION=${tool_versions.compile_xcassets} " +
"python $_tool$_compress_pngs -p \"$_sdk_name\" " +
"-t \"$_min_deployment_target\" -T \"{{bundle_product_type}}\" " +
"-P \"{{bundle_partial_info_plist}}\" -o {{output}} {{inputs}}"
description = "COMPILE_XCASSETS {{output}}"
pool = ":bundle_pool($default_toolchain)"
}
}
tool("action") {