summaryrefslogtreecommitdiffstats
path: root/build/linux
diff options
context:
space:
mode:
authorbedupont <bedupont@cisco.com>2014-11-04 08:30:41 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-04 16:31:00 +0000
commit65ce5accb99908e292b9766c3da6cf54d6cc337f (patch)
tree454ba55656d2cdf5df1e3ec1fbafb9b52f455239 /build/linux
parentad866659e9426c920f2c3fef2054e4ccb6b2d40f (diff)
downloadchromium_src-65ce5accb99908e292b9766c3da6cf54d6cc337f.zip
chromium_src-65ce5accb99908e292b9766c3da6cf54d6cc337f.tar.gz
chromium_src-65ce5accb99908e292b9766c3da6cf54d6cc337f.tar.bz2
Provide a way to disable libpci dependency.
Add a new gyp variable: use_libpci (default value is 1). Add a new define when use_libpci==1: USE_LIBPCI. Don't call specific PCI code in gpu_info_collector_linux.cc if USE_LIBPCI isn't defined. BUG=427401 R=piman@chromium.org Review URL: https://codereview.chromium.org/692893004 Cr-Commit-Position: refs/heads/master@{#302613}
Diffstat (limited to 'build/linux')
-rw-r--r--build/linux/system.gyp132
1 files changed, 68 insertions, 64 deletions
diff --git a/build/linux/system.gyp b/build/linux/system.gyp
index 8f9b2d8..3e88093 100644
--- a/build/linux/system.gyp
+++ b/build/linux/system.gyp
@@ -466,6 +466,74 @@
},
],
}],
+ ['use_libpci==1', {
+ 'targets': [
+ {
+ 'target_name': 'libpci',
+ 'type': 'static_library',
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags libpci)',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(SHARED_INTERMEDIATE_DIR)',
+ ],
+ 'conditions': [
+ ['linux_link_libpci==1', {
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l libpci)',
+ ],
+ }
+ }],
+ ],
+ },
+ 'include_dirs': [
+ '../..',
+ ],
+ 'hard_dependency': 1,
+ 'actions': [
+ {
+ 'variables': {
+ 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libpci.h',
+ 'output_cc': '<(INTERMEDIATE_DIR)/libpci_loader.cc',
+ 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
+ },
+ 'action_name': 'generate_libpci_loader',
+ 'inputs': [
+ '<(generator)',
+ ],
+ 'outputs': [
+ '<(output_h)',
+ '<(output_cc)',
+ ],
+ 'action': ['python',
+ '<(generator)',
+ '--name', 'LibPciLoader',
+ '--output-h', '<(output_h)',
+ '--output-cc', '<(output_cc)',
+ '--header', '<pci/pci.h>',
+ # TODO(phajdan.jr): Report problem to pciutils project
+ # and get it fixed so that we don't need --use-extern-c.
+ '--use-extern-c',
+ '--link-directly=<(linux_link_libpci)',
+ 'pci_alloc',
+ 'pci_init',
+ 'pci_cleanup',
+ 'pci_scan_bus',
+ 'pci_fill_info',
+ 'pci_lookup_name',
+ ],
+ 'message': 'Generating libpci library loader',
+ 'process_outputs_as_sources': 1,
+ },
+ ],
+ },
+ ],
+ }],
], # conditions
'targets': [
{
@@ -841,70 +909,6 @@
},
},
{
- 'target_name': 'libpci',
- 'type': 'static_library',
- 'cflags': [
- '<!@(<(pkg-config) --cflags libpci)',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- 'conditions': [
- ['linux_link_libpci==1', {
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l libpci)',
- ],
- }
- }],
- ],
- },
- 'include_dirs': [
- '../..',
- ],
- 'hard_dependency': 1,
- 'actions': [
- {
- 'variables': {
- 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libpci.h',
- 'output_cc': '<(INTERMEDIATE_DIR)/libpci_loader.cc',
- 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
- },
- 'action_name': 'generate_libpci_loader',
- 'inputs': [
- '<(generator)',
- ],
- 'outputs': [
- '<(output_h)',
- '<(output_cc)',
- ],
- 'action': ['python',
- '<(generator)',
- '--name', 'LibPciLoader',
- '--output-h', '<(output_h)',
- '--output-cc', '<(output_cc)',
- '--header', '<pci/pci.h>',
- # TODO(phajdan.jr): Report problem to pciutils project
- # and get it fixed so that we don't need --use-extern-c.
- '--use-extern-c',
- '--link-directly=<(linux_link_libpci)',
- 'pci_alloc',
- 'pci_init',
- 'pci_cleanup',
- 'pci_scan_bus',
- 'pci_fill_info',
- 'pci_lookup_name',
- ],
- 'message': 'Generating libpci library loader',
- 'process_outputs_as_sources': 1,
- },
- ],
- },
- {
'target_name': 'libresolv',
'type': 'none',
'link_settings': {