Chromium Code Reviews
Help | Chromium Project | Sign in
(137)

Issue 10948014: Allow library entries of the form '-lfoo' on MSVS. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 7 months ago by Sam Clegg
Modified:
1 year, 6 months ago
Reviewers:
bradnelson, bradn
CC:
gyp-developer_googlegroups.com
Visibility:
Public.

Description

Allow library entries of the form '-lfoo' on MSVS.

This allows libraries to be specified in way that
works on all platforms.


BUG=

Committed: https://code.google.com/p/gyp/source/detail?r=1505

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Lint Patch
M pylib/gyp/generator/msvs.py View 1 chunk +2 lines, -0 lines 0 comments ? errors Download
M pylib/gyp/generator/msvs_test.py View 1 chunk +3 lines, -0 lines 0 comments ? errors Download
Commit:

Messages

Total messages: 6
Sam Clegg
1 year, 6 months ago #1
bradn
Nothing inherently bad, but what's use case? I mean are there an windows system libs ...
1 year, 6 months ago #2
Sam Clegg
On 2012/09/21 05:23:47, bradn wrote: > Nothing inherently bad, but what's use case? > I ...
1 year, 6 months ago #3
bradn
Ah, ppapi trusted libraries. Ok. LGTM
1 year, 6 months ago #4
Ryan Sleevi
On 2012/09/21 17:44:06, Sam Clegg wrote: > On 2012/09/21 05:23:47, bradn wrote: > > Nothing ...
1 year, 6 months ago #5
Sam Clegg
1 year, 6 months ago #6
On 2012/09/21 18:19:09, Ryan Sleevi wrote:
> On 2012/09/21 17:44:06, Sam Clegg wrote:
> > On 2012/09/21 05:23:47, bradn wrote:
> > > Nothing inherently bad, but what's use case?
> > > I mean are there an windows system libs that match posix-y ones?
> > > Maybe I'm missing something.
> > 
> > Not only system libs.  Our particular use case is that
> > when building nacl apps we want to link against ppapi_cpp
> > (and friends) on all platforms.
> > 
> > I can think of many other examples of cross platform libs
> > that are often distributed in binary from (SDL, libjpeg, etc).
> > Having a cross platform way to say "use this lib" is surely
> > a useful thing.  I guess chrome pretty much builds everything
> > from source so it hasn't come up until now.
> 
> It has come up, but it tends to be resolved by
> 
> 'msvs_settings': {
>   'VCLinkerTool': {
>     'AdditionalDependencies': [
>       'z.lib',
>     ],
>     'AdditionalLibraryDirectories': [
>       'path/to/lib/dir',
>     ],
>   },
> },

Yup.. this is the kind of thing I'm trying to avoid.

> 
> In a related effort, there was an attempt to make library_dirs behave in a
> cross-platform manner ( see https://chromiumcodereview.appspot.com/10749020/ )

This seems like a great idea.   I hope this is still the plan
to submit this.

> 
> > 
> > TBH, I think the cleanest way to do this kind of thing would
> > be to mandate that all 'libraries' are just the bare names
> > and the generators know how to expand them into link args.
> > e.g:
> > 
> > linux:  'z' -> '-lz'
> > win32:  'z' -> 'z.lib'
> > 
> > But this change is (hopefully) much less intrusive and will
> > provide a way to express cross platform libs without breaking
> > any existing gyp files.
> 
> I agree, it would be nice to have a consistent, cross-platform way to do that.
> One thing worth noting is that the '-l' form actually invokes "special"
> behaviour in GYP, in that it doesn't force pathname relativization and doesn't
> force list singleton behaviour (
> http://code.google.com/p/gyp/wiki/InputFormatReference#Pathname_Relativization
> ). Changing to just use 'z' runs the risk of both, so it'd likely require some
> careful work to get the semantics right.

Right, I see that would be a more involved change.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1275:d14800f88434