diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-12 18:26:47 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-12 18:26:47 +0000 |
commit | 8815b7f26086c7a8b98dfeb11efa32aa4fd483e1 (patch) | |
tree | 4af3c88c2f79aadfaf8d40c1bb7aa32841ffa60d /o3d/plugin | |
parent | df4b4ef3ac8829b20b07bca9161865ee4ab469eb (diff) | |
download | chromium_src-8815b7f26086c7a8b98dfeb11efa32aa4fd483e1.zip chromium_src-8815b7f26086c7a8b98dfeb11efa32aa4fd483e1.tar.gz chromium_src-8815b7f26086c7a8b98dfeb11efa32aa4fd483e1.tar.bz2 |
o3d/linux: fix --as-needed for gles
Review URL: http://codereview.chromium.org/2946005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52108 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin')
-rw-r--r-- | o3d/plugin/plugin.gyp | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/o3d/plugin/plugin.gyp b/o3d/plugin/plugin.gyp index aa190ee..f43511a 100644 --- a/o3d/plugin/plugin.gyp +++ b/o3d/plugin/plugin.gyp @@ -100,6 +100,30 @@ # repackaging. 'plugin_rpath%' : '/opt/google/o3d/lib', # empty => none 'plugin_env_vars_file%' : '/opt/google/o3d/envvars', # empty => none + 'conditions' : [ + ['renderer == "gl"', + { + 'as_needed_ldflags': [ + # 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', + '-ldl', # Used by breakpad + '-lrt', + ] + }, { + 'as_needed_ldflags': [] + } + ], + ] }, 'target_name': '<(plugin_npapi_filename)', 'type': 'loadable_module', @@ -282,20 +306,7 @@ '-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', - '-ldl', # Used by breakpad - '-lrt', + '<(as_needed_ldflags)', # Directs the linker to only generate dependencies on libraries # that we actually use. Must come last. '-Wl,--as-needed', |