| 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 import("//build/config/nacl/config.gni") | 5 import("//build/config/nacl/config.gni") |
| 6 import("//build/config/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
| 7 import("//build/toolchain/ccache.gni") | 7 import("//build/toolchain/ccache.gni") |
| 8 import("//build/toolchain/goma.gni") | 8 import("//build/toolchain/goma.gni") |
| 9 import("//build/toolchain/toolchain.gni") | 9 import("//build/toolchain/toolchain.gni") |
| 10 | 10 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 outfile, | 354 outfile, |
| 355 ] | 355 ] |
| 356 if (outfile != unstripped_outfile) { | 356 if (outfile != unstripped_outfile) { |
| 357 outputs += [ unstripped_outfile ] | 357 outputs += [ unstripped_outfile ] |
| 358 } | 358 } |
| 359 if (defined(invoker.link_outputs)) { | 359 if (defined(invoker.link_outputs)) { |
| 360 outputs += invoker.link_outputs | 360 outputs += invoker.link_outputs |
| 361 } | 361 } |
| 362 } | 362 } |
| 363 | 363 |
| 364 # These two are really entirely generic, but have to be repeated in |
| 365 # each toolchain because GN doesn't allow a template to be used here. |
| 366 # See //build/toolchain/toolchain.gni for details. |
| 364 tool("stamp") { | 367 tool("stamp") { |
| 365 command = "touch {{output}}" | 368 command = stamp_command |
| 366 description = "STAMP {{output}}" | 369 description = stamp_description |
| 367 } | 370 } |
| 368 | |
| 369 tool("copy") { | 371 tool("copy") { |
| 370 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} &
& cp -af {{source}} {{output}})" | 372 command = copy_command |
| 371 description = "COPY {{source}} {{output}}" | 373 description = copy_description |
| 372 } | 374 } |
| 373 | 375 |
| 374 # When invoking this toolchain not as the default one, these args will be | 376 # When invoking this toolchain not as the default one, these args will be |
| 375 # passed to the build. They are ignored when this is the default toolchain. | 377 # passed to the build. They are ignored when this is the default toolchain. |
| 376 toolchain_args() { | 378 toolchain_args() { |
| 377 current_cpu = invoker.toolchain_cpu | 379 current_cpu = invoker.toolchain_cpu |
| 378 current_os = invoker.toolchain_os | 380 current_os = invoker.toolchain_os |
| 379 | 381 |
| 380 # These values need to be passed through unchanged. | 382 # These values need to be passed through unchanged. |
| 381 target_os = target_os | 383 target_os = target_os |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 nm = "${toolprefix}nm" | 439 nm = "${toolprefix}nm" |
| 438 | 440 |
| 439 forward_variables_from(invoker, | 441 forward_variables_from(invoker, |
| 440 [ | 442 [ |
| 441 "toolchain_cpu", | 443 "toolchain_cpu", |
| 442 "toolchain_os", | 444 "toolchain_os", |
| 443 "use_gold", | 445 "use_gold", |
| 444 ]) | 446 ]) |
| 445 } | 447 } |
| 446 } | 448 } |
| OLD | NEW |