Index: build/toolchain/gcc_toolchain.gni |
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni |
index ea13aadcb93ca17b7f0699898a11af30d47421cf..5c31a8e5f7eb6c005b7cf0f10836bbe0bbe8343c 100644 |
--- a/build/toolchain/gcc_toolchain.gni |
+++ b/build/toolchain/gcc_toolchain.gni |
@@ -163,6 +163,9 @@ template("gcc_toolchain") { |
sofile, |
tocfile, |
] |
+ if (defined(invoker.solink_outputs)) { |
+ outputs += invoker.solink_outputs |
+ } |
link_output = sofile |
depend_output = tocfile |
} |
@@ -171,9 +174,15 @@ template("gcc_toolchain") { |
outfile = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" |
rspfile = "$outfile.rsp" |
command = "$ld {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix" |
+ if (defined(invoker.postlink)) { |
+ command += " && " + invoker.postlink |
+ } |
description = "LINK $outfile" |
rspfile_content = "{{inputs}}" |
outputs = [ outfile ] |
+ if (defined(invoker.link_outputs)) { |
+ outputs += invoker.link_outputs |
+ } |
} |
tool("stamp") { |