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

Unified Diff: plugin/plugin.gyp

Issue 1072008: Linux: link with --as-needed to eliminate direct dependencies on 15 shared li... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: plugin/plugin.gyp
===================================================================
--- plugin/plugin.gyp (revision 41891)
+++ plugin/plugin.gyp (working copy)
@@ -232,7 +232,27 @@
'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': [
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698