OLD | NEW |
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/clang/clang.gni") | 10 import("//build/config/clang/clang.gni") |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 # $ mkdir newdir | 319 # $ mkdir newdir |
320 # $ cd olddir | 320 # $ cd olddir |
321 # $ pax -rwl . ../newdir | 321 # $ pax -rwl . ../newdir |
322 # | 322 # |
323 # The _copydir command does exactly that but use an absolute path | 323 # The _copydir command does exactly that but use an absolute path |
324 # constructed using shell variable $OLDPWD (automatically set when | 324 # constructed using shell variable $OLDPWD (automatically set when |
325 # cd is used) as computing the relative path is a bit complex and | 325 # cd is used) as computing the relative path is a bit complex and |
326 # using pwd would requires a sub-shell to be created. | 326 # using pwd would requires a sub-shell to be created. |
327 _copydir = "mkdir -p {{output}} && cd {{source}} && " + | 327 _copydir = "mkdir -p {{output}} && cd {{source}} && " + |
328 "pax -rwl . \"\$OLDPWD\"/{{output}}" | 328 "pax -rwl . \"\$OLDPWD\"/{{output}}" |
329 _command = "if [[ -d {{source}} ]]; then " + _copydir + "; else " + | 329 command = "rm -rf {{output}} && if [[ -d {{source}} ]]; then " + |
330 copy_command + "; fi" | 330 _copydir + "; else " + copy_command + "; fi" |
331 | 331 |
332 # TODO(crbug.com/625578): Remove this conversion on iOS once all the | |
333 # bundle_data target have been fixed to reference converted files. | |
334 _convert_strings = is_ios | |
335 if (_convert_strings) { | |
336 _convert = "plutil -convert binary1 -o {{output}} {{source}}" | |
337 _command = "case {{source}} in " + "*.strings) " + _convert + ";; " + | |
338 "*) " + _command + ";; esac" | |
339 } | |
340 | |
341 command = "rm -rf {{output}} && " + _command | |
342 description = "COPY_BUNDLE_DATA {{source}} {{output}}" | 332 description = "COPY_BUNDLE_DATA {{source}} {{output}}" |
343 pool = ":bundle_pool($default_toolchain)" | 333 pool = ":bundle_pool($default_toolchain)" |
344 } | 334 } |
345 tool("compile_xcassets") { | 335 tool("compile_xcassets") { |
346 _tool = rebase_path("//build/toolchain/mac/compile_xcassets.py", | 336 _tool = rebase_path("//build/toolchain/mac/compile_xcassets.py", |
347 root_build_dir) | 337 root_build_dir) |
348 if (is_ios) { | 338 if (is_ios) { |
349 _sdk_name = ios_sdk_name | 339 _sdk_name = ios_sdk_name |
350 _min_deployment_target = ios_deployment_target | 340 _min_deployment_target = ios_deployment_target |
351 } else { | 341 } else { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 | 386 |
397 mac_toolchain("ios_clang_x86") { | 387 mac_toolchain("ios_clang_x86") { |
398 toolchain_cpu = "x86" | 388 toolchain_cpu = "x86" |
399 toolchain_os = "ios" | 389 toolchain_os = "ios" |
400 } | 390 } |
401 | 391 |
402 mac_toolchain("ios_clang_x64") { | 392 mac_toolchain("ios_clang_x64") { |
403 toolchain_cpu = "x64" | 393 toolchain_cpu = "x64" |
404 toolchain_os = "ios" | 394 toolchain_os = "ios" |
405 } | 395 } |
OLD | NEW |