Index: build/toolchain/gcc_toolchain.gni |
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni |
index 6746f5e0db9ffe5bd5c804553d99c2ad20aadce4..3af4ff3468e74afc986dd7aabf66a4f2da812bb2 100644 |
--- a/build/toolchain/gcc_toolchain.gni |
+++ b/build/toolchain/gcc_toolchain.gni |
@@ -347,12 +347,8 @@ template("gcc_toolchain") { |
command = "$ld {{ldflags}} -o $unstripped_outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix" |
if (defined(invoker.strip)) { |
- strip_command = |
- "${invoker.strip} --strip-unneeded -o $outfile $unstripped_outfile" |
- command += " && " + strip_command |
- } |
- if (defined(invoker.postlink)) { |
- command += " && " + invoker.postlink |
+ link_wrapper = rebase_path("//build/toolchain/gcc_link_wrapper.py") |
+ command = "$python_path $link_wrapper --strip=${invoker.strip} --unstripped-file=$unstripped_outfile --output=$outfile -- $command" |
} |
description = "LINK $outfile" |
rspfile_content = "{{inputs}}" |