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

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
« no previous file with comments | « no previous file | content/content_gpu.gypi » ('j') | 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) 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 'sources': [
286 '<(SHARED_INTERMEDIATE_DIR)/libpci_loader/libpci_loader.cc',
Mark Mentovai 2012/11/27 20:10:20 The .cc doesn’t need to be in the shared dir, it c
Paweł Hajdan Jr. 2012/11/27 22:27:24 Done.
287 ],
288 'include_dirs': [
289 '../..',
290 '<(SHARED_INTERMEDIATE_DIR)/libpci_loader',
291 ],
292 'direct_dependent_settings': {
293 'include_dirs': [
294 '<(SHARED_INTERMEDIATE_DIR)/libpci_loader',
Mark Mentovai 2012/11/27 20:10:20 I’d rather see includers #include something that h
Paweł Hajdan Jr. 2012/11/27 22:27:24 Done.
295 ],
296 'conditions': [
297 ['linux_link_libpci==1', {
298 'link_settings': {
299 'ldflags': [
300 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
301 ],
302 'libraries': [
303 '<!@(<(pkg-config) --libs-only-l libpci)',
304 ],
305 }
306 }],
307 ],
308 },
309 'hard_dependency': 1,
Mark Mentovai 2012/11/27 20:10:20 If this was inline in content_gpu, I don’t think i
Paweł Hajdan Jr. 2012/11/27 22:27:24 I think even when it was inline, it still needed h
Mark Mentovai 2012/11/27 23:09:11 Paweł Hajdan Jr. wrote:
310 'actions': [
311 {
312 'action_name': 'generate_libpci_loader',
313 'inputs': [
314 '../../tools/generate_library_loader/generate_library_loader.py',
315 ],
316 'outputs': [
317 '<(SHARED_INTERMEDIATE_DIR)/libpci_loader/libpci_loader.cc',
Mark Mentovai 2012/11/27 20:10:20 If you used process_outputs_as_sources, you wouldn
Paweł Hajdan Jr. 2012/11/27 22:27:24 Done.
318 '<(SHARED_INTERMEDIATE_DIR)/libpci_loader/libpci_loader.h',
319 ],
320 'action': ['python',
321 '../../tools/generate_library_loader/generate_library_loade r.py',
322 '--name', 'LibPciLoader',
323 '--output', '<(SHARED_INTERMEDIATE_DIR)/libpci_loader/libpc i_loader',
324 '--header', '<pci/pci.h>',
325 '--use-extern-c',
326 '--link-directly=<(linux_link_libpci)',
327 'pci_alloc',
328 'pci_init',
329 'pci_cleanup',
330 'pci_scan_bus',
331 'pci_fill_info',
332 'pci_lookup_name',
333 ],
334 'message': 'Generating libpci library loader.',
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
« no previous file with comments | « no previous file | content/content_gpu.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698