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

Issue 10749020: Adds support for the library_dirs key, which appears in the documentation but was never actually im… (Closed)

Created:
8 years, 5 months ago by Brian Ellis
Modified:
7 years, 5 months ago
CC:
Nico, gyp-developer_googlegroups.com
Visibility:
Public.

Description

Adds support for the library_dirs key, which appears in the documentation but was never actually implemented. library_dirs is essentially equivalent to adding "-Lfoo" to ldflags in Make, modifying LIBRARY_SEARCH_PATHS in Xcode, or adding AdditionalLibraryPaths to the VCLinkerTool or VCLibrarianTool in MSVS. I have attempted to make an analogous change to the ninja generator, but have not been able to test it (ninja was not in the tree I checked out) and I am fairly sure it's wrong. Guidance here would be appreciated. I have created a modified version of the mac/libraries test to test this change; a cross-platform test proved impossible because I needed to copy the lib somewhere, and doing so with a copies section caused a circular dependency which caused Make to fail (though it worked fine in Xcode). For some reason, although the implementation of library_dirs is a straightforward addition to LIBRARY_SEARCH_PATHS, simply substituting the former for the latter did not work until I removed the <(DEPTH) reference from the library_dirs list. This may indicate a bug in my code, but I'm not certain, since neither test/mac/library_dir nor test/mac/libraries worked for me when I tried building their gypfiles directly and building the products in Xcode.

Patch Set 1 : #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Total comments: 7

Patch Set 4 : #

Total comments: 2

Patch Set 5 : library_dirs #

Patch Set 6 : library_dirs #

Patch Set 7 : library_dirs #

Patch Set 8 : library_dirs #

Patch Set 9 : library_dirs #

Patch Set 10 : library_dirs #

Total comments: 10

Patch Set 11 : library_dirs #

Total comments: 4

Patch Set 12 : library_dirs #

Patch Set 13 : library_dirs #

Patch Set 14 : library_dirs #

Patch Set 15 : library_dirs #

Patch Set 16 : library_dirs #

Patch Set 17 : library_dirs #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+193 lines, -15 lines) Patch
M pylib/gyp/generator/make.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M pylib/gyp/generator/msvs.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 chunks +27 lines, -6 lines 0 comments Download
M pylib/gyp/generator/ninja.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +24 lines, -9 lines 1 comment Download
M pylib/gyp/generator/xcode.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -0 lines 0 comments Download
A test/library_dirs/gyptest-library-dirs.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +33 lines, -0 lines 0 comments Download
A test/library_dirs/subdir/README.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
A test/library_dirs/subdir/hello.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -0 lines 0 comments Download
A test/library_dirs/subdir/mylib.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +12 lines, -0 lines 0 comments Download
A test/library_dirs/subdir/mylib.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download
A test/library_dirs/subdir/test.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +68 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (0 generated)
Brian Ellis
Ah, found it. :-)
8 years, 5 months ago (2012-07-17 19:53:08 UTC) #1
Mark Mentovai
+ a couple other generator maintainers to make sure that the changes to all of ...
8 years, 5 months ago (2012-07-17 19:58:33 UTC) #2
Brian Ellis
http://chromiumcodereview.appspot.com/10749020/diff/16001/pylib/gyp/input.py File pylib/gyp/input.py (right): http://chromiumcodereview.appspot.com/10749020/diff/16001/pylib/gyp/input.py#newcode38 pylib/gyp/input.py:38: 'library_dirs', On 2012/07/17 19:58:34, Mark Mentovai wrote: > It ...
8 years, 5 months ago (2012-07-17 20:26:52 UTC) #3
bradn
msvs looks ok, but it would be nice if the test got run there :-)
8 years, 5 months ago (2012-07-17 21:17:31 UTC) #4
Brian Ellis
On 2012/07/17 21:17:31, bradn wrote: > msvs looks ok, but it would be nice if ...
8 years, 5 months ago (2012-07-17 21:24:42 UTC) #5
Nico
Very cool! Let's try to get the test working for all generators though. http://chromiumcodereview.appspot.com/10749020/diff/23001/pylib/gyp/generator/make.py File ...
8 years, 5 months ago (2012-07-21 19:14:48 UTC) #6
Brian Ellis
On 2012/07/21 19:14:48, Nico wrote: > Very cool! Let's try to get the test working ...
8 years, 5 months ago (2012-07-23 23:30:04 UTC) #7
Brian Ellis
http://chromiumcodereview.appspot.com/10749020/diff/23001/pylib/gyp/generator/make.py File pylib/gyp/generator/make.py (right): http://chromiumcodereview.appspot.com/10749020/diff/23001/pylib/gyp/generator/make.py#newcode1421 pylib/gyp/generator/make.py:1421: library_dirs = spec.get('library_dirs', []) On 2012/07/21 19:14:48, Nico wrote: ...
8 years, 5 months ago (2012-07-23 23:30:26 UTC) #8
Nico
http://chromiumcodereview.appspot.com/10749020/diff/30002/test/mac/library_dirs/subdir/test.gyp File test/mac/library_dirs/subdir/test.gyp (right): http://chromiumcodereview.appspot.com/10749020/diff/30002/test/mac/library_dirs/subdir/test.gyp#newcode38 test/mac/library_dirs/subdir/test.gyp:38: 'postbuild_name': 'Copy to secret location, with secret name', postbuilds ...
8 years, 5 months ago (2012-07-23 23:37:01 UTC) #9
Brian Ellis
http://chromiumcodereview.appspot.com/10749020/diff/30002/test/mac/library_dirs/subdir/test.gyp File test/mac/library_dirs/subdir/test.gyp (right): http://chromiumcodereview.appspot.com/10749020/diff/30002/test/mac/library_dirs/subdir/test.gyp#newcode38 test/mac/library_dirs/subdir/test.gyp:38: 'postbuild_name': 'Copy to secret location, with secret name', On ...
8 years, 5 months ago (2012-07-23 23:45:33 UTC) #10
Sam Clegg
Any reason why the new test is in that 'mac' folder?
8 years, 4 months ago (2012-08-06 17:31:13 UTC) #11
Brian Ellis
On 2012/08/06 17:31:13, Sam Clegg wrote: > Any reason why the new test is in ...
8 years, 4 months ago (2012-08-06 20:37:23 UTC) #12
moscati
On 2012/08/06 20:37:23, Brian Ellis wrote: > On 2012/08/06 17:31:13, Sam Clegg wrote: > > ...
7 years, 8 months ago (2013-04-24 16:34:02 UTC) #13
bradn
Is this still alive?
7 years, 7 months ago (2013-04-29 21:32:44 UTC) #14
Dimi Shahbaz
On 2013/04/29 21:32:44, bradn wrote: > Is this still alive? I've updated Brian's CL, will ...
7 years, 7 months ago (2013-04-29 21:35:46 UTC) #15
Dimi Shahbaz
OK, that looks like it worked. There are some changes from Brian's last patch set, ...
7 years, 7 months ago (2013-04-30 00:12:59 UTC) #16
Brian Ellis
On 2013/04/30 00:12:59, Dimi Shahbaz wrote: > OK, that looks like it worked. There are ...
7 years, 7 months ago (2013-04-30 00:27:27 UTC) #17
Brian Ellis
On 2013/04/30 00:27:27, Brian Ellis wrote: > On 2013/04/30 00:12:59, Dimi Shahbaz wrote: > > ...
7 years, 7 months ago (2013-04-30 00:33:19 UTC) #18
Dimi Shahbaz
On 2013/04/30 00:33:19, Brian Ellis wrote: > On 2013/04/30 00:27:27, Brian Ellis wrote: > > ...
7 years, 7 months ago (2013-04-30 21:40:37 UTC) #19
bradn
That's just the default svn port. You probably need to cache your password. And you'll ...
7 years, 7 months ago (2013-04-30 23:12:56 UTC) #20
Dimi Shahbaz
I think I need some help debugging why the try servers report different results from ...
7 years, 7 months ago (2013-05-03 08:34:11 UTC) #21
Dimi Shahbaz
I think maybe I have this figured out, something about the temp paths. Locally I'm ...
7 years, 7 months ago (2013-05-10 22:49:54 UTC) #22
Dimi Shahbaz
OK! All green! The last piece that was missing was that our msvs generator patch ...
7 years, 7 months ago (2013-05-16 23:00:02 UTC) #23
Dimi Shahbaz
ping? how to proceed?
7 years, 7 months ago (2013-05-21 00:35:37 UTC) #24
Dimi Shahbaz
daily ping mode: enabled. ping.
7 years, 6 months ago (2013-05-29 05:35:23 UTC) #25
Mark Mentovai
https://chromiumcodereview.appspot.com/10749020/diff/110001/pylib/gyp/generator/xcode.py File pylib/gyp/generator/xcode.py (right): https://chromiumcodereview.appspot.com/10749020/diff/110001/pylib/gyp/generator/xcode.py#newcode1197 pylib/gyp/generator/xcode.py:1197: return '"%s"' % s ? This isn’t the right ...
7 years, 6 months ago (2013-05-29 13:23:07 UTC) #26
Dimi Shahbaz
https://chromiumcodereview.appspot.com/10749020/diff/110001/pylib/gyp/generator/xcode.py File pylib/gyp/generator/xcode.py (right): https://chromiumcodereview.appspot.com/10749020/diff/110001/pylib/gyp/generator/xcode.py#newcode1197 pylib/gyp/generator/xcode.py:1197: return '"%s"' % s On 2013/05/29 13:23:07, Mark Mentovai ...
7 years, 6 months ago (2013-05-29 21:32:40 UTC) #27
Mark Mentovai
https://chromiumcodereview.appspot.com/10749020/diff/126002/pylib/gyp/generator/ninja.py File pylib/gyp/generator/ninja.py (right): https://chromiumcodereview.appspot.com/10749020/diff/126002/pylib/gyp/generator/ninja.py#newcode777 pylib/gyp/generator/ninja.py:777: [QuoteShellArgument('-LIBPATH:' + self.GypPathToNinja(l), self.flavor) Watch the 80-column limit. https://chromiumcodereview.appspot.com/10749020/diff/126002/test/library_dirs/subdir/test.gyp ...
7 years, 6 months ago (2013-05-29 21:40:34 UTC) #28
Dimi Shahbaz
https://chromiumcodereview.appspot.com/10749020/diff/126002/pylib/gyp/generator/ninja.py File pylib/gyp/generator/ninja.py (right): https://chromiumcodereview.appspot.com/10749020/diff/126002/pylib/gyp/generator/ninja.py#newcode777 pylib/gyp/generator/ninja.py:777: [QuoteShellArgument('-LIBPATH:' + self.GypPathToNinja(l), self.flavor) On 2013/05/29 21:40:35, Mark Mentovai ...
7 years, 6 months ago (2013-05-29 21:45:16 UTC) #29
bradn
lgtm on msvc
7 years, 6 months ago (2013-05-29 22:11:47 UTC) #30
Dimi Shahbaz
On 2013/05/29 22:11:47, bradn wrote: > lgtm on msvc ping? do I need lgtms elsewhere?
7 years, 6 months ago (2013-06-19 23:19:00 UTC) #31
Mark Mentovai
LGTM
7 years, 6 months ago (2013-06-20 16:07:55 UTC) #32
bradn
lgtm
7 years, 6 months ago (2013-06-20 16:25:09 UTC) #33
Dimi Shahbaz
On 2013/06/20 16:25:09, bradn wrote: > lgtm r1657. thanks all!
7 years, 5 months ago (2013-07-02 00:50:58 UTC) #34
Nico
https://chromiumcodereview.appspot.com/10749020/diff/171001/pylib/gyp/generator/ninja.py File pylib/gyp/generator/ninja.py (right): https://chromiumcodereview.appspot.com/10749020/diff/171001/pylib/gyp/generator/ninja.py#newcode1714 pylib/gyp/generator/ninja.py:1714: '$libdirs $libs'}), Is it possible to just add these ...
7 years, 5 months ago (2013-07-02 01:20:14 UTC) #35
Dimi Shahbaz
7 years, 5 months ago (2013-07-02 03:29:43 UTC) #36
Message was sent while issue was closed.
On 2013/07/02 01:20:14, Nico wrote:
>
https://chromiumcodereview.appspot.com/10749020/diff/171001/pylib/gyp/generat...
> File pylib/gyp/generator/ninja.py (right):
> 
>
https://chromiumcodereview.appspot.com/10749020/diff/171001/pylib/gyp/generat...
> pylib/gyp/generator/ninja.py:1714: '$libdirs $libs'}),
> Is it possible to just add these flags to the "libs" variable? This way ninja
> needs to do fewer variable lookups. Have you benchmarked if this change has an
> impact on empty build times for chrome?

I have not benchmarked it. Having not looked at the ninja code, is variable
lookup very costly? 

I can benchmark the chrome build before/after this change if necessary?

Powered by Google App Engine
This is Rietveld 408576698