diff options
author | tschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-19 23:42:55 +0000 |
---|---|---|
committer | tschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-19 23:42:55 +0000 |
commit | 71cbae7bdfed9c023c21c37bf4551a8d18dfa3d2 (patch) | |
tree | 27fe0d7c7bb2236639464b826542bc70d7566e14 /o3d/plugin | |
parent | 839ef7cb2f2f8f5e1b16581e13b4477d5cbc081a (diff) | |
download | chromium_src-71cbae7bdfed9c023c21c37bf4551a8d18dfa3d2.zip chromium_src-71cbae7bdfed9c023c21c37bf4551a8d18dfa3d2.tar.gz chromium_src-71cbae7bdfed9c023c21c37bf4551a8d18dfa3d2.tar.bz2 |
Linux: link with --as-needed to eliminate direct dependencies on 15 shared libraries that we don't actually use.
TEST=built on Linux and ran it
BUG=none
Review URL: http://codereview.chromium.org/1072008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42173 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin')
-rw-r--r-- | o3d/plugin/plugin.gyp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/o3d/plugin/plugin.gyp b/o3d/plugin/plugin.gyp index efe1495..fcb27b9 100644 --- a/o3d/plugin/plugin.gyp +++ b/o3d/plugin/plugin.gyp @@ -232,6 +232,26 @@ 'ldflags': [ '-Wl,-znodelete', '-Wl,--gc-sections', + '<!@(pkg-config --libs-only-L xt)', + # The Cg libs use three other libraries without linking to them, + # which breaks --as-needed, so we have to specify them here before + # the --as-needed flag. + '-lGL', # Used by libCgGL + '-lpthread', # Used by libCg + '-lm', # Used by libCg + # GYP dumps all static and shared libraries into one archive group + # on the command line in arbitrary order, which breaks + # --as-needed, so we have to specify the out-of-order ones before + # the --as-needed flag. + '-lCgGL', + '-lGLEW', + '-lrt', + # Directs the linker to only generate dependencies on libraries + # that we actually use. Must come last. + '-Wl,--as-needed', + ], + 'libraries': [ + '<!@(pkg-config --libs-only-l xt)', ], 'conditions' : [ ['plugin_rpath != ""', @@ -251,12 +271,6 @@ ], }, ], - ['OS == "linux"', - { - 'sources': [ - ], - }, - ], ['OS == "win"', { 'dependencies': [ |