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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # PLEASE NOTE: This file contains the targets for generating the 5 # PLEASE NOTE: This file contains the targets for generating the
6 # plugin two different ways -- once as a shared library, and once as a 6 # plugin two different ways -- once as a shared library, and once as a
7 # static library. The static library is only built if we are inside 7 # static library. The static library is only built if we are inside
8 # of a Chrome tree, and it gets built with different defined symbols, 8 # of a Chrome tree, and it gets built with different defined symbols,
9 # and without the packaging code on the Mac. The shared library gets 9 # and without the packaging code on the Mac. The shared library gets
10 # built in an o3d tree, or in a chrome tree when built by an o3d 10 # built in an o3d tree, or in a chrome tree when built by an o3d
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 ['OS == "linux"', 225 ['OS == "linux"',
226 { 226 {
227 'sources': [ 227 'sources': [
228 'linux/config.cc', 228 'linux/config.cc',
229 'linux/envvars.cc', 229 'linux/envvars.cc',
230 'linux/main_linux.cc', 230 'linux/main_linux.cc',
231 ], 231 ],
232 'ldflags': [ 232 'ldflags': [
233 '-Wl,-znodelete', 233 '-Wl,-znodelete',
234 '-Wl,--gc-sections', 234 '-Wl,--gc-sections',
235 '<!@(pkg-config --libs-only-L xt)',
236 # The Cg libs use three other libraries without linking to them,
237 # which breaks --as-needed, so we have to specify them here before
238 # the --as-needed flag.
239 '-lGL', # Used by libCgGL
240 '-lpthread', # Used by libCg
241 '-lm', # Used by libCg
242 # GYP dumps all static and shared libraries into one archive group
243 # on the command line in arbitrary order, which breaks
244 # --as-needed, so we have to specify the out-of-order ones before
245 # the --as-needed flag.
246 '-lCgGL',
247 '-lGLEW',
248 '-lrt',
249 # Directs the linker to only generate dependencies on libraries
250 # that we actually use. Must come last.
251 '-Wl,--as-needed',
252 ],
253 'libraries': [
254 '<!@(pkg-config --libs-only-l xt)',
235 ], 255 ],
236 'conditions' : [ 256 'conditions' : [
237 ['plugin_rpath != ""', 257 ['plugin_rpath != ""',
238 { 258 {
239 'ldflags': [ 259 'ldflags': [
240 '-Wl,-rpath', '-Wl,<(plugin_rpath)', 260 '-Wl,-rpath', '-Wl,<(plugin_rpath)',
241 ], 261 ],
242 }, 262 },
243 ], 263 ],
244 ['plugin_env_vars_file != ""', 264 ['plugin_env_vars_file != ""',
245 { 265 {
246 'defines': [ 266 'defines': [
247 'O3D_PLUGIN_ENV_VARS_FILE="<(plugin_env_vars_file)"', 267 'O3D_PLUGIN_ENV_VARS_FILE="<(plugin_env_vars_file)"',
248 ], 268 ],
249 }, 269 },
250 ], 270 ],
251 ], 271 ],
252 }, 272 },
253 ], 273 ],
254 ['OS == "linux"',
255 {
256 'sources': [
257 ],
258 },
259 ],
260 ['OS == "win"', 274 ['OS == "win"',
261 { 275 {
262 'dependencies': [ 276 'dependencies': [
263 '../breakpad/breakpad.gyp:o3dBreakpad', 277 '../breakpad/breakpad.gyp:o3dBreakpad',
264 ], 278 ],
265 'sources': [ 279 'sources': [
266 'win/config.cc', 280 'win/config.cc',
267 'win/logger_main.cc', 281 'win/logger_main.cc',
268 'win/main_win.cc', 282 'win/main_win.cc',
269 'win/o3dPlugin.def', 283 'win/o3dPlugin.def',
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 }, 719 },
706 ], 720 ],
707 ], 721 ],
708 } 722 }
709 723
710 # Local Variables: 724 # Local Variables:
711 # tab-width:2 725 # tab-width:2
712 # indent-tabs-mode:nil 726 # indent-tabs-mode:nil
713 # End: 727 # End:
714 # vim: set expandtab tabstop=2 shiftwidth=2: 728 # vim: set expandtab tabstop=2 shiftwidth=2:
OLDNEW
« 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