Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2864)

Unified Diff: build/toolchain/gcc_toolchain.gni

Issue 304293003: Use response files in the GN build for shared libs and executables (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/toolchain/mac/BUILD.gn » ('j') | build/toolchain/mac/BUILD.gn » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/gcc_toolchain.gni
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni
index 91baa11b8473190d519cc501fb01378a5a5a6147..bc5288300fa43790180cb7445a37cfcb234c7aad 100644
--- a/build/toolchain/gcc_toolchain.gni
+++ b/build/toolchain/gcc_toolchain.gni
@@ -72,18 +72,24 @@ template("gcc_toolchain") {
deps = "gcc"
}
tool("alink") {
- command = "rm -f \$out && $ar rcs \$out \$in"
+ command = "rm -f \$out && $ar rcs \$out @\$rspfile"
description = "AR \$out"
+ rspfile = "\$out.rsp"
+ rspfile_content = "\$in"
}
tool("solink") {
- command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ]; then $ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive \$libs && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive $libs_section_prefix \$libs $libs_section_postfix && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi"
+ command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ]; then $ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname @\$rspfile && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive $libs_section_prefix \$libs $libs_section_postfix && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi"
description = "SOLINK \$lib"
+ rspfile = "\$out.rsp"
Nico 2014/05/30 16:37:24 Note that this won't work on OS X in ninja 1.4, th
brettw 2014/05/30 17:24:39 Okay, I require a trunk Ninja build for Windows to
+ rspfile_content = "-Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive \$libs"
brettw 2014/05/30 00:49:31 This is copied from GYP. Not sure why it includes
Nico 2014/05/30 16:37:24 Doesn't matter too much I suppose; I felt putting
#pool = "link_pool"
restat = "1"
}
tool("link") {
- command = "$ld \$ldflags -o \$out -Wl,--start-group \$in \$solibs -Wl,--end-group $libs_section_prefix \$libs $libs_section_postfix"
+ command = "$ld \$ldflags -o \$out -Wl,--start-group @\$rspfile \$solibs -Wl,--end-group $libs_section_prefix \$libs $libs_section_postfix"
description = "LINK \$out"
+ rspfile = "\$out.rsp"
+ rspfile_content = "\$in"
#pool = "link_pool"
}
tool("stamp") {
« no previous file with comments | « no previous file | build/toolchain/mac/BUILD.gn » ('j') | build/toolchain/mac/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698