Skip to content

Commit

Permalink
Merge "GN Standalone: use .rsp files" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
primiano authored and Gerrit Code Review committed Feb 26, 2024
2 parents 473fa9e + 433e0dc commit 20f1b36
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gn/standalone/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,13 @@ template("gcc_like_toolchain") {
tool("solink") {
soname = "{{target_output_name}}{{output_extension}}"
unstripped_so = "{{root_out_dir}}/$soname"
rspfile = "$unstripped_so.rsp"
rspfile_content = "{{inputs}}"
rpath = "-Wl,-soname,$soname"
if (is_mac) {
rpath = "-Wl,-install_name,@rpath/$soname"
}
command = "$cc_wrapper $cxx $ld_arg -shared {{ldflags}} ${external_ldflags} {{inputs}} {{solibs}} {{libs}} $rpath -o $unstripped_so"
command = "$cc_wrapper $cxx $ld_arg -shared {{ldflags}} ${external_ldflags} @$rspfile {{solibs}} {{libs}} $rpath -o $unstripped_so"
outputs = [ unstripped_so ]
output_prefix = "lib"
default_output_extension = ".so"
Expand All @@ -316,7 +318,9 @@ template("gcc_like_toolchain") {
tool("link") {
unstripped_exe =
"{{root_out_dir}}/{{target_output_name}}{{output_extension}}"
command = "$cc_wrapper $cxx $ld_arg {{ldflags}} ${external_ldflags} {{inputs}} {{solibs}} {{libs}} -o $unstripped_exe"
rspfile = "$unstripped_exe.rsp"
rspfile_content = "{{inputs}}"
command = "$cc_wrapper $cxx $ld_arg {{ldflags}} ${external_ldflags} @$rspfile {{solibs}} {{libs}} -o $unstripped_exe"
outputs = [ unstripped_exe ]
description = "link $unstripped_exe"
if (strip != "") {
Expand Down

0 comments on commit 20f1b36

Please sign in to comment.