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

Side by Side Diff: build/linux/system.gyp

Issue 11415138: Linux: create a library loader code generator for dlopen and use it for libpci. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 8 years 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
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 { 5 {
6 'variables': { 6 'variables': {
7 'conditions': [ 7 'conditions': [
8 ['sysroot!=""', { 8 ['sysroot!=""', {
9 'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"', 9 'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
10 }, { 10 }, {
11 'pkg-config': 'pkg-config' 11 'pkg-config': 'pkg-config'
12 }] 12 }]
13 ], 13 ],
14
15 'linux_link_libpci%': 0,
14 }, 16 },
15 'conditions': [ 17 'conditions': [
16 [ 'os_posix==1 and OS!="mac"', { 18 [ 'os_posix==1 and OS!="mac"', {
17 'variables': { 19 'variables': {
18 # We use our own copy of libssl3, although we still need to link against 20 # We use our own copy of libssl3, although we still need to link against
19 # the rest of NSS. 21 # the rest of NSS.
20 'use_system_ssl%': 0, 22 'use_system_ssl%': 0,
21 }, 23 },
22 }, { 24 }, {
23 'variables': { 25 'variables': {
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 'libraries': [ 270 'libraries': [
269 '-ldl', 271 '-ldl',
270 ], 272 ],
271 }], 273 }],
272 ], 274 ],
273 }, 275 },
274 }], 276 }],
275 ], 277 ],
276 }, 278 },
277 { 279 {
280 'target_name': 'libpci',
281 'type': 'static_library',
282 'cflags': [
283 '<!@(<(pkg-config) --cflags libpci)',
284 ],
285 'include_dirs': [
286 '../..',
287 ],
288 'direct_dependent_settings': {
289 'include_dirs': [
290 '<(SHARED_INTERMEDIATE_DIR)',
291 ],
292 'conditions': [
293 ['linux_link_libpci==1', {
294 'link_settings': {
295 'ldflags': [
296 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
297 ],
298 'libraries': [
299 '<!@(<(pkg-config) --libs-only-l libpci)',
300 ],
301 }
302 }],
303 ],
304 },
305 'hard_dependency': 1,
306 'actions': [
307 {
308 'action_name': 'generate_libpci_loader',
309 'inputs': [
310 '../../tools/generate_library_loader/generate_library_loader.py',
311 ],
312 'outputs': [
313 '<(INTERMEDIATE_DIR)/libpci_loader.cc',
314 '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libpci.h',
315 ],
316 'action': ['python',
317 '../../tools/generate_library_loader/generate_library_loade r.py',
318 '--name', 'LibPciLoader',
319 '--output-h', '<(SHARED_INTERMEDIATE_DIR)/library_loaders/l ibpci.h',
Mark Mentovai 2012/11/27 23:09:11 I’d declare the h name and cc name as variables, a
Paweł Hajdan Jr. 2012/11/28 01:05:52 Done.
320 '--output-cc', '<(INTERMEDIATE_DIR)/libpci_loader.cc',
321 '--header', '<pci/pci.h>',
322 # TODO(phajdan.jr): Report problem to pciutils project
323 # and get it fixed so that we don't need --use-extern-c.
324 '--use-extern-c',
325 '--link-directly=<(linux_link_libpci)',
326 'pci_alloc',
327 'pci_init',
328 'pci_cleanup',
329 'pci_scan_bus',
330 'pci_fill_info',
331 'pci_lookup_name',
332 ],
333 'message': 'Generating libpci library loader.',
334 'process_outputs_as_sources': 1,
335 },
336 ],
337 },
338 {
278 'target_name': 'x11', 339 'target_name': 'x11',
279 'type': 'none', 340 'type': 'none',
280 'toolsets': ['host', 'target'], 341 'toolsets': ['host', 'target'],
281 'conditions': [ 342 'conditions': [
282 ['_toolset=="target"', { 343 ['_toolset=="target"', {
283 'direct_dependent_settings': { 344 'direct_dependent_settings': {
284 'cflags': [ 345 'cflags': [
285 '<!@(<(pkg-config) --cflags x11)', 346 '<!@(<(pkg-config) --cflags x11)',
286 ], 347 ],
287 }, 348 },
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 ], 668 ],
608 'libraries': [ 669 'libraries': [
609 '<!@(<(pkg-config) --libs-only-l libudev)', 670 '<!@(<(pkg-config) --libs-only-l libudev)',
610 ], 671 ],
611 }, 672 },
612 }], 673 }],
613 ], 674 ],
614 }, 675 },
615 ], 676 ],
616 } 677 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698