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

Issue 304293003: Use response files in the GN build for shared libs and executables (Closed)

Created:
6 years, 6 months ago by brettw
Modified:
6 years, 6 months ago
Reviewers:
jamesr, Nico
CC:
chromium-reviews
Visibility:
Public.

Description

Use response files in the GN build for shared libs and executables We already blow out the command-line length limit on one of the bots. TBR=thakis@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273859

Patch Set 1 #

Patch Set 2 : #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -9 lines) Patch
M build/toolchain/gcc_toolchain.gni View 1 chunk +9 lines, -3 lines 4 comments Download
M build/toolchain/mac/BUILD.gn View 1 chunk +12 lines, -6 lines 4 comments Download

Messages

Total messages: 8 (0 generated)
brettw
https://codereview.chromium.org/304293003/diff/20001/build/toolchain/gcc_toolchain.gni File build/toolchain/gcc_toolchain.gni (right): https://codereview.chromium.org/304293003/diff/20001/build/toolchain/gcc_toolchain.gni#newcode84 build/toolchain/gcc_toolchain.gni:84: rspfile_content = "-Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive \$libs" This is ...
6 years, 6 months ago (2014-05-30 00:49:31 UTC) #1
brettw
Committed patchset #2 manually as r273859 (presubmit successful).
6 years, 6 months ago (2014-05-30 16:31:25 UTC) #2
Nico
https://codereview.chromium.org/304293003/diff/20001/build/toolchain/gcc_toolchain.gni File build/toolchain/gcc_toolchain.gni (right): https://codereview.chromium.org/304293003/diff/20001/build/toolchain/gcc_toolchain.gni#newcode83 build/toolchain/gcc_toolchain.gni:83: rspfile = "\$out.rsp" Note that this won't work on ...
6 years, 6 months ago (2014-05-30 16:37:24 UTC) #3
brettw
https://codereview.chromium.org/304293003/diff/20001/build/toolchain/gcc_toolchain.gni File build/toolchain/gcc_toolchain.gni (right): https://codereview.chromium.org/304293003/diff/20001/build/toolchain/gcc_toolchain.gni#newcode83 build/toolchain/gcc_toolchain.gni:83: rspfile = "\$out.rsp" On 2014/05/30 16:37:24, Nico (traveling) wrote: ...
6 years, 6 months ago (2014-05-30 17:24:38 UTC) #4
Nico
https://codereview.chromium.org/304293003/diff/20001/build/toolchain/mac/BUILD.gn File build/toolchain/mac/BUILD.gn (left): https://codereview.chromium.org/304293003/diff/20001/build/toolchain/mac/BUILD.gn#oldcode84 build/toolchain/mac/BUILD.gn:84: description = "LIBTOOL-STATIC \$out, POSTBUILDS" On 2014/05/30 17:24:39, brettw ...
6 years, 6 months ago (2014-05-30 17:35:38 UTC) #5
jamesr
No luck for me on OS X: $ ls -l out_gn/Debug/libevent.a.rsp -rw-r--r-- 1 jamesr staff ...
6 years, 6 months ago (2014-06-01 23:45:11 UTC) #6
jamesr
If i replace spaces with newlines in the .rsp file and pass it to libtool ...
6 years, 6 months ago (2014-06-01 23:52:17 UTC) #7
Nico
6 years, 6 months ago (2014-06-02 08:07:05 UTC) #8
Message was sent while issue was closed.
On 2014/06/01 23:45:11, jamesr wrote:
> No luck for me on OS X:
> 
> $ ls -l out_gn/Debug/libevent.a.rsp 
> -rw-r--r--  1 jamesr  staff  601 Jun  1 16:42 out_gn/Debug/libevent.a.rsp
> jamesr-mbp-retina:src jamesr$ ninja -C out_gn/Debug libevent -v
> ninja: Entering directory `out_gn/Debug'
> [1/1] rm -f libevent.a && ./gyp-mac-tool filter-libtool libtool  -static -o
> libevent.a @libevent.a.rsp 
> FAILED: rm -f libevent.a && ./gyp-mac-tool filter-libtool libtool  -static -o
> libevent.a @libevent.a.rsp 
> error:
>
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool:
> can't open file: @libevent.a.rsp (No such file or directory)
> ninja: build stopped: subcommand failed.
> 
> I'm using the gn and ninja binaries from depot_tools (version 271709 and 1.4.0
> respectively).

As mentioned upthread, depot_tools ninja is no longer good enough after this
change (but not because of libtool, because of ld and spaces in filenames) - you
need trunk.

…but it looks like https://codereview.chromium.org/197823008/ doesn't use
rspfiles for alink in gyp. I suppose libtool just doesn't suppose the @ syntax,
so the alink patch of this patch needs to be undone, or use -filelist I suppose.
Sorry for missing this.

> I can't figure out where the .rsp file is written to

(You can pass `-d keeprsp` to ninja to make it not delete rspfiles right after
using them.)

Powered by Google App Engine
This is Rietveld 408576698