| 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/ios/ios_sdk.gni") | 10 import("//build/config/ios/ios_sdk.gni") |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 } | 276 } |
| 277 | 277 |
| 278 tool("copy_bundle_data") { | 278 tool("copy_bundle_data") { |
| 279 if (is_ios) { | 279 if (is_ios) { |
| 280 _extra_args = "--strings-format=binary1" | 280 _extra_args = "--strings-format=binary1" |
| 281 } else { | 281 } else { |
| 282 _extra_args = "" | 282 _extra_args = "" |
| 283 } | 283 } |
| 284 _tool = rebase_path("//build/toolchain/mac/copy_bundle_data.py", | 284 _tool = rebase_path("//build/toolchain/mac/copy_bundle_data.py", |
| 285 root_build_dir) | 285 root_build_dir) |
| 286 command = "python $_tool ${_extra_args} {{source}} {{output}}" | 286 command = "python $_tool --version-for-gn=1 " + |
| 287 "${_extra_args} {{source}} {{output}}" |
| 287 description = "COPY_BUNDLE_DATA {{source}} {{output}}" | 288 description = "COPY_BUNDLE_DATA {{source}} {{output}}" |
| 288 pool = ":bundle_pool($default_toolchain)" | 289 pool = ":bundle_pool($default_toolchain)" |
| 289 } | 290 } |
| 290 tool("compile_xcassets") { | 291 tool("compile_xcassets") { |
| 291 _tool = rebase_path("//build/toolchain/mac/compile_xcassets.py", | 292 _tool = rebase_path("//build/toolchain/mac/compile_xcassets.py", |
| 292 root_build_dir) | 293 root_build_dir) |
| 293 if (is_ios) { | 294 if (is_ios) { |
| 294 _sdk_name = ios_sdk_name | 295 _sdk_name = ios_sdk_name |
| 295 _min_deployment_target = ios_deployment_target | 296 _min_deployment_target = ios_deployment_target |
| 296 } else { | 297 } else { |
| 297 _sdk_name = mac_sdk_name | 298 _sdk_name = mac_sdk_name |
| 298 _min_deployment_target = mac_deployment_target | 299 _min_deployment_target = mac_deployment_target |
| 299 } | 300 } |
| 300 command = "rm -f {{output}} && " + | 301 command = "python $_tool --version-for-gn=1 -p $_sdk_name " + |
| 301 "python $_tool -p $_sdk_name -t $_min_deployment_target " + | 302 "-t $_min_deployment_target -o {{output}} {{inputs}}" |
| 302 "-o {{output}} {{inputs}}" | |
| 303 | 303 |
| 304 description = "COMPILE_XCASSETS {{output}}" | 304 description = "COMPILE_XCASSETS {{output}}" |
| 305 pool = ":bundle_pool($default_toolchain)" | 305 pool = ":bundle_pool($default_toolchain)" |
| 306 } | 306 } |
| 307 | 307 |
| 308 toolchain_args() { | 308 toolchain_args() { |
| 309 current_cpu = invoker.toolchain_cpu | 309 current_cpu = invoker.toolchain_cpu |
| 310 current_os = invoker.toolchain_os | 310 current_os = invoker.toolchain_os |
| 311 | 311 |
| 312 # These values need to be passed through unchanged. | 312 # These values need to be passed through unchanged. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 } | 395 } |
| 396 | 396 |
| 397 mac_toolchain("x64") { | 397 mac_toolchain("x64") { |
| 398 toolchain_cpu = "x64" | 398 toolchain_cpu = "x64" |
| 399 toolchain_os = "mac" | 399 toolchain_os = "mac" |
| 400 cc = "${goma_prefix}/gcc" | 400 cc = "${goma_prefix}/gcc" |
| 401 cxx = "${goma_prefix}/g++" | 401 cxx = "${goma_prefix}/g++" |
| 402 ld = cxx | 402 ld = cxx |
| 403 is_clang = false | 403 is_clang = false |
| 404 } | 404 } |
| OLD | NEW |