summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-20 21:36:41 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-20 21:36:41 +0000
commit1286292ab7b47880a257b5480736ea7bf19eace9 (patch)
tree9f7ebb1cd1c70697c561beeb0f2bdad628375c5f /build
parent5c6946ce9091271002d108c4ad416fe53c9c4c45 (diff)
downloadchromium_src-1286292ab7b47880a257b5480736ea7bf19eace9.zip
chromium_src-1286292ab7b47880a257b5480736ea7bf19eace9.tar.gz
chromium_src-1286292ab7b47880a257b5480736ea7bf19eace9.tar.bz2
Put $_LIBDIRFLAGS before ${LINK,SHLINK,LDMODULE}FLAGS so we prefer
our own libs (libpng.a, libz.a, etc.) to system ones. Review URL: http://codereview.chromium.org/90006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14059 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/common.gypi13
1 files changed, 10 insertions, 3 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 84fd9a9..1d81fb2 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -208,9 +208,16 @@
# require --{start,end}-group. There has been a lot of
# refactoring since this was first coded, which might have
# eliminated the circular dependencies.
- 'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET', '$LINKFLAGS', '$SOURCES', '$_LIBDIRFLAGS', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
- 'SHLINKCOM': [['$FLOCK_SHLINK', '-o', '$TARGET', '$SHLINKFLAGS', '$SOURCES', '$_LIBDIRFLAGS', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
- 'LDMODULECOM': [['$FLOCK_LDMODULE', '-o', '$TARGET', '$LDMODULEFLAGS', '$SOURCES', '$_LIBDIRFLAGS', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
+ #
+ # Note: $_LIBDIRFLAGS comes before ${LINK,SHLINK,LDMODULE}FLAGS
+ # so that we prefer our own built libraries (e.g. -lpng) to
+ # system versions of libraries that pkg-config might turn up.
+ # TODO(sgk): investigate handling this not by re-ordering the
+ # flags this way, but by adding a hook to use the SCons
+ # ParseFlags() option on the output from pkg-config.
+ 'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET', '$_LIBDIRFLAGS', '$LINKFLAGS', '$SOURCES', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
+ 'SHLINKCOM': [['$FLOCK_SHLINK', '-o', '$TARGET', '$_LIBDIRFLAGS', '$SHLINKFLAGS', '$SOURCES', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
+ 'LDMODULECOM': [['$FLOCK_LDMODULE', '-o', '$TARGET', '$_LIBDIRFLAGS', '$LDMODULEFLAGS', '$SOURCES', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
'IMPLICIT_COMMAND_DEPENDENCIES': 0,
},
'scons_import_variables': [