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

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

Created:
8 years, 3 months ago by Sam Clegg
Modified:
8 years, 2 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) Patch
M pylib/gyp/generator/msvs.py View 1 chunk +2 lines, -0 lines 0 comments Download
M pylib/gyp/generator/msvs_test.py View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Sam Clegg
8 years, 3 months ago (2012-09-19 22:44:36 UTC) #1
bradn
Nothing inherently bad, but what's use case? I mean are there an windows system libs ...
8 years, 3 months ago (2012-09-21 05:23:47 UTC) #2
Sam Clegg
On 2012/09/21 05:23:47, bradn wrote: > Nothing inherently bad, but what's use case? > I ...
8 years, 3 months ago (2012-09-21 17:44:06 UTC) #3
bradn
Ah, ppapi trusted libraries. Ok. LGTM
8 years, 3 months ago (2012-09-21 17:45:09 UTC) #4
Ryan Sleevi
On 2012/09/21 17:44:06, Sam Clegg wrote: > On 2012/09/21 05:23:47, bradn wrote: > > Nothing ...
8 years, 3 months ago (2012-09-21 18:19:09 UTC) #5
Sam Clegg
8 years, 3 months ago (2012-09-21 18:53:34 UTC) #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.

Powered by Google App Engine
This is Rietveld 408576698