Commit 6dbc039e authored by jamesr@chromium.org's avatar jamesr@chromium.org

GN: Use -Wl,-filelist for rsp files on mac instead of @

The mac GN build exceeds the command line limit when linking large
targets like webkit_unit_tests. The fix is to pass a response file to
the linker instead of passing a list of object files. Passing this by
@rspfile ends up expanding the list before calling clang, so this instead
passes it via the filelist parameter.

BUG=386046

Review URL: https://codereview.chromium.org/340233002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278424 0039d316-1c4b-4281-b951-d872f2087c98
parent 7ef57e13
...@@ -84,18 +84,18 @@ template("mac_clang_toolchain") { ...@@ -84,18 +84,18 @@ template("mac_clang_toolchain") {
description = "LIBTOOL-STATIC \$out" description = "LIBTOOL-STATIC \$out"
} }
tool("solink") { tool("solink") {
command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ] || otool -l \$lib | grep -q LC_REEXPORT_DYLIB ; then $ld -shared \$ldflags -o \$lib @\$rspfile \$solibs \$libs \$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib \$in \$solibs \$libs \$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${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 ] || otool -l \$lib | grep -q LC_REEXPORT_DYLIB ; then $ld -shared \$ldflags -o \$lib -Wl,-filelist,\$rspfile \$solibs \$libs \$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib \$in \$solibs \$libs \$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi"
description = "SOLINK \$lib" description = "SOLINK \$lib"
rspfile = "\$out.rsp" rspfile = "\$out.rsp"
rspfile_content = "\$in" rspfile_content = "\$in_newline"
#pool = "link_pool" #pool = "link_pool"
restat = "1" restat = "1"
} }
tool("link") { tool("link") {
command = "$ld \$ldflags -o \$out @\$rspfile \$solibs \$libs \$postbuilds" command = "$ld \$ldflags -o \$out -Wl,-filelist,\$rspfile \$solibs \$libs \$postbuilds"
description = "LINK \$out" description = "LINK \$out"
rspfile = "\$out.rsp" rspfile = "\$out.rsp"
rspfile_content = "\$in" rspfile_content = "\$in_newline"
#pool = "link_pool" #pool = "link_pool"
} }
#tool("infoplist") { #tool("infoplist") {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment