| Index: build/toolchain/gcc_toolchain.gni
|
| diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni
|
| index 11753343accb33652dba166c83363c7899ce86ae..1cbdb5f8c5d2520ad8fc4d141a75da883d35dbb9 100644
|
| --- a/build/toolchain/gcc_toolchain.gni
|
| +++ b/build/toolchain/gcc_toolchain.gni
|
| @@ -38,8 +38,8 @@ concurrent_links = exec_script("get_concurrent_links.py", [], "value")
|
| # - is_clang
|
| # - strip
|
| # Location of the strip executable. When specified, strip will be run on
|
| -# all shared libraries and executables as they are built. The pre-stripped
|
| -# artifacts will be put in lib.stripped/ and exe.stripped/.
|
| +# all executables as they are built. The stripped artifacts will be put in
|
| +# exe.stripped/.
|
| template("gcc_toolchain") {
|
| toolchain(target_name) {
|
| assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value")
|
| @@ -192,17 +192,16 @@ template("gcc_toolchain") {
|
| exename = "{{target_output_name}}{{output_extension}}"
|
| outfile = "{{root_out_dir}}/$exename"
|
| rspfile = "$outfile.rsp"
|
| - unstripped_outfile = outfile
|
|
|
| if (defined(invoker.strip)) {
|
| - unstripped_outfile = "{{root_out_dir}}/exe.unstripped/$exename"
|
| + stripped_outfile = "{{root_out_dir}}/exe.stripped/$exename"
|
| }
|
|
|
| - command = "$ld {{ldflags}} -o $unstripped_outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix"
|
| + command = "$ld {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix"
|
| if (defined(invoker.strip)) {
|
| strip = invoker.strip
|
| strip_command =
|
| - "${strip} --strip-unneeded -o $outfile $unstripped_outfile"
|
| + "${strip} --strip-unneeded -o $stripped_outfile $outfile"
|
| command += " && " + strip_command
|
| }
|
| if (defined(invoker.postlink)) {
|
| @@ -213,8 +212,8 @@ template("gcc_toolchain") {
|
| outputs = [
|
| outfile,
|
| ]
|
| - if (outfile != unstripped_outfile) {
|
| - outputs += [ unstripped_outfile ]
|
| + if (defined(invoker.strip)) {
|
| + outputs += [ stripped_outfile ]
|
| }
|
| if (defined(invoker.link_outputs)) {
|
| outputs += invoker.link_outputs
|
|
|