Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: build/toolchain/mac/BUILD.gn

Issue 2023223002: [GN] Add script to compile assets catalog without using tools/gyp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@{0}
Patch Set: Use mac_sdk_name in "compile_xcassets" tool definition Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/toolchain/mac/compile_xcassets.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires 5 # TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires
6 # some enhancements since the commands on Mac are slightly different than on 6 # some enhancements since the commands on Mac are slightly different than on
7 # Linux. 7 # Linux.
8 8
9 import("../goma.gni") 9 import("../goma.gni")
10 import("//build/config/ios/ios_sdk.gni") 10 import("//build/config/ios/ios_sdk.gni")
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 description = copy_description 237 description = copy_description
238 } 238 }
239 239
240 tool("copy_bundle_data") { 240 tool("copy_bundle_data") {
241 _tool = rebase_path("//build/toolchain/mac/copy_bundle_data.py", 241 _tool = rebase_path("//build/toolchain/mac/copy_bundle_data.py",
242 root_build_dir) 242 root_build_dir)
243 command = "python $_tool {{source}} {{output}}" 243 command = "python $_tool {{source}} {{output}}"
244 description = "COPY_BUNDLE_DATA {{source}} {{output}}" 244 description = "COPY_BUNDLE_DATA {{source}} {{output}}"
245 } 245 }
246 tool("compile_xcassets") { 246 tool("compile_xcassets") {
247 _tool = rebase_path("//build/toolchain/mac/compile_xcassets.py",
248 root_build_dir)
247 if (is_ios) { 249 if (is_ios) {
248 _configuration = "Release" 250 _sdk_name = ios_sdk_name
249 if (is_debug) { 251 _min_deployment_target = ios_deployment_target
250 _configuration = "Debug" 252 } else {
251 } 253 _sdk_name = mac_sdk_name
254 _min_deployment_target = mac_deployment_target
255 }
256 command = "rm -f {{output}} && " +
257 "python $_tool -p $_sdk_name -t $_min_deployment_target " +
258 "-o {{output}} {{inputs}}"
252 259
253 _compile_xcassets_env =
254 "IPHONEOS_DEPLOYMENT_TARGET=$ios_deployment_target " +
255 "CONFIGURATION=$ios_sdk_name-$_configuration " +
256 "CONTENTS_FOLDER_PATH=\$(dirname {{output}})"
257 } else {
258 _compile_xcassets_env =
259 "MACOSX_DEPLOYMENT_TARGET=$mac_deployment_target " +
260 "UNLOCALIZED_RESOURCES_FOLDER_PATH=\$(dirname {{output}})"
261 }
262
263 command = "rm -f {{output}} && " +
264 "env $_compile_xcassets_env ./gyp-mac-tool compile-xcassets " +
265 "{} {{inputs}}"
266 description = "COMPILE_XCASSETS {{output}}" 260 description = "COMPILE_XCASSETS {{output}}"
267 } 261 }
268 262
269 toolchain_args() { 263 toolchain_args() {
270 current_cpu = invoker.toolchain_cpu 264 current_cpu = invoker.toolchain_cpu
271 current_os = invoker.toolchain_os 265 current_os = invoker.toolchain_os
272 266
273 # These values need to be passed through unchanged. 267 # These values need to be passed through unchanged.
274 host_toolchain = host_toolchain 268 host_toolchain = host_toolchain
275 target_os = target_os 269 target_os = target_os
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 } 350 }
357 351
358 mac_toolchain("x64") { 352 mac_toolchain("x64") {
359 toolchain_cpu = "x64" 353 toolchain_cpu = "x64"
360 toolchain_os = "mac" 354 toolchain_os = "mac"
361 cc = "${goma_prefix}/gcc" 355 cc = "${goma_prefix}/gcc"
362 cxx = "${goma_prefix}/g++" 356 cxx = "${goma_prefix}/g++"
363 ld = cxx 357 ld = cxx
364 is_clang = false 358 is_clang = false
365 } 359 }
OLDNEW
« no previous file with comments | « no previous file | build/toolchain/mac/compile_xcassets.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698