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: http://src.chromium.org/svn/trunk/src/build@14059 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
sgk@google.com 2009-04-20 21:36:41 +00:00
Родитель 616e8a5b57
Коммит f1811fc0d4
1 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -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': [