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

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

Issue 1432603003: GN: Avoid nontrivial shell commands in gcc_toolchain tool("link") (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn set-but-unused nit 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 | « build/toolchain/gcc_link_wrapper.py ('k') | build/toolchain/nacl/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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 # overrides it (in which case {{output_extension}} will be what the target 340 # overrides it (in which case {{output_extension}} will be what the target
341 # specifies). 341 # specifies).
342 default_output_extension = default_executable_extension 342 default_output_extension = default_executable_extension
343 343
344 if (defined(invoker.strip)) { 344 if (defined(invoker.strip)) {
345 unstripped_outfile = "{{root_out_dir}}/exe.unstripped/$exename" 345 unstripped_outfile = "{{root_out_dir}}/exe.unstripped/$exename"
346 } 346 }
347 347
348 command = "$ld {{ldflags}} -o $unstripped_outfile -Wl,--start-group @$rspf ile {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postf ix" 348 command = "$ld {{ldflags}} -o $unstripped_outfile -Wl,--start-group @$rspf ile {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postf ix"
349 if (defined(invoker.strip)) { 349 if (defined(invoker.strip)) {
350 strip_command = 350 link_wrapper = rebase_path("//build/toolchain/gcc_link_wrapper.py")
351 "${invoker.strip} --strip-unneeded -o $outfile $unstripped_outfile" 351 command = "$python_path $link_wrapper --strip=${invoker.strip} --unstrip ped-file=$unstripped_outfile --output=$outfile -- $command"
352 command += " && " + strip_command
353 }
354 if (defined(invoker.postlink)) {
355 command += " && " + invoker.postlink
356 } 352 }
357 description = "LINK $outfile" 353 description = "LINK $outfile"
358 rspfile_content = "{{inputs}}" 354 rspfile_content = "{{inputs}}"
359 outputs = [ 355 outputs = [
360 outfile, 356 outfile,
361 ] 357 ]
362 if (outfile != unstripped_outfile) { 358 if (outfile != unstripped_outfile) {
363 outputs += [ unstripped_outfile ] 359 outputs += [ unstripped_outfile ]
364 } 360 }
365 if (defined(invoker.link_outputs)) { 361 if (defined(invoker.link_outputs)) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 nm = "${toolprefix}nm" 441 nm = "${toolprefix}nm"
446 442
447 forward_variables_from(invoker, 443 forward_variables_from(invoker,
448 [ 444 [
449 "toolchain_cpu", 445 "toolchain_cpu",
450 "toolchain_os", 446 "toolchain_os",
451 "use_gold", 447 "use_gold",
452 ]) 448 ])
453 } 449 }
454 } 450 }
OLDNEW
« no previous file with comments | « build/toolchain/gcc_link_wrapper.py ('k') | build/toolchain/nacl/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698