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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 } |
OLD | NEW |