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

Side by Side Diff: build/toolchain/gcc_toolchain.gni

Issue 1412623007: GN: Factor "stamp" and "copy" details out of toolchains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/BUILD.gn » ('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 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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | build/toolchain/mac/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698