Skip to content

Commit

Permalink
linux/gyp: Find missing symbols at build time, not runtime.
Browse files Browse the repository at this point in the history
Limited to very few cases for now (non-chromeos, non-android,
non-official, component builds only).

BUG=371125
TBR=piman,dalecurtis

Review URL: https://codereview.chromium.org/854753002

Cr-Commit-Position: refs/heads/master@{#312020}
  • Loading branch information
nico authored and Commit bot committed Jan 17, 2015
1 parent 8be8b4d commit faffc1a
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ash/ash.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,7 @@
'../ui/events/events.gyp:events',
'../ui/events/events.gyp:events_base',
'../ui/events/events.gyp:gesture_detection',
'../ui/events/platform/events_platform.gyp:events_platform',
'../ui/gfx/gfx.gyp:gfx',
'../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/keyboard/keyboard.gyp:keyboard',
Expand Down Expand Up @@ -929,7 +930,9 @@
}],
['use_x11==1', {
'dependencies': [
'../build/linux/system.gyp:x11',
'../build/linux/system.gyp:xfixes',
'../ui/gfx/x/gfx_x11.gyp:gfx_x11',
],
}],
['use_ozone==1', {
Expand Down
8 changes: 8 additions & 0 deletions build/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -3534,6 +3534,14 @@
],
},
}],
# TODO(thakis): Enable this everywhere. http://crbug.com/371125
['OS=="linux" and chromeos==0 and component=="shared_library" and use_ozone!=1 and buildtype!="Official"', {
'target_defaults': {
'ldflags': [
'-Wl,-z,defs',
],
},
}],
['os_posix==1 and chromeos==0', {
# Chrome OS enables -fstack-protector-strong via its build wrapper,
# and we want to avoid overriding this, so stack-protector is only
Expand Down
10 changes: 10 additions & 0 deletions chrome/browser/ui/libgtk2ui/libgtk2ui.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,21 @@
'../../../../build/linux/system.gyp:gconf',
'../../../../build/linux/system.gyp:gtk',
'../../../../build/linux/system.gyp:gtkprint',
'../../../../build/linux/system.gyp:x11',
'../../../../components/components_resources.gyp:components_resources',
'../../../../content/content.gyp:content',
'../../../../printing/printing.gyp:cups',
'../../../../printing/printing.gyp:printing',
'../../../../skia/skia.gyp:skia',
'../../../../ui/aura/aura.gyp:aura',
'../../../../ui/base/ui_base.gyp:ui_base',
'../../../../ui/events/events.gyp:events',
'../../../../ui/events/events.gyp:events_base',
'../../../../ui/gfx/gfx.gyp:gfx',
'../../../../ui/gfx/x/gfx_x11.gyp:gfx_x11',
'../../../../ui/native_theme/native_theme.gyp:native_theme',
'../../../../ui/resources/ui_resources.gyp:ui_resources',
'../../../../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs',
'../../../../ui/strings/ui_strings.gyp:ui_strings',
'../../../../ui/views/views.gyp:views',
'../../../chrome_resources.gyp:chrome_extra_resources',
Expand Down
2 changes: 2 additions & 0 deletions content/content_browser.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -1813,6 +1813,8 @@
['use_x11==1', {
'dependencies': [
'../build/linux/system.gyp:x11',
'../ui/events/platform/x11/x11_events_platform.gyp:x11_events_platform',
'../ui/gfx/x/gfx_x11.gyp:gfx_x11',
],
}],
['use_pango==1', {
Expand Down
3 changes: 3 additions & 0 deletions content/content_shell.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,9 @@
'-fvisibility=default',
],
}],
['OS == "linux"', {
'dependencies': [ '../build/linux/system.gyp:x11' ],
}],
['OS=="win"', {
'defines': [
# This seems like a hack, but this is what Safari Win does.
Expand Down
1 change: 1 addition & 0 deletions gpu/gpu_config.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
'../build/linux/system.gyp:x11',
'../build/linux/system.gyp:xext',
'../third_party/libXNVCtrl/libXNVCtrl.gyp:libXNVCtrl',
'../ui/gfx/x/gfx_x11.gyp:gfx_x11',
],
}],
],
Expand Down
1 change: 1 addition & 0 deletions media/media.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@
'../build/linux/system.gyp:xext',
'../build/linux/system.gyp:xfixes',
'../build/linux/system.gyp:xtst',
'../ui/gfx/x/gfx_x11.gyp:gfx_x11',
],
}, { # else: use_x11==0
'sources!': [
Expand Down
1 change: 1 addition & 0 deletions media/media_cdm.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
# Because clearkeycdm has type 'loadable_module' (see comments),
# we must explicitly specify this dependency.
'libraries': [
'-lrt',
# Built by clearkeycdm.
'<(PRODUCT_DIR)/libclearkeycdm.so',
],
Expand Down
9 changes: 9 additions & 0 deletions third_party/mesa/mesa.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,15 @@
'KEYWORD2=GLAPIENTRY',
],
}],
['OS=="linux"', {
'link_settings': {
'libraries': [
'-ldl',
'-lm',
'-lstdc++',
],
},
}],
],
'include_dirs': [
'src/src/mapi',
Expand Down
2 changes: 2 additions & 0 deletions ui/aura/aura.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@
'../../build/linux/system.gyp:x11',
'../../build/linux/system.gyp:xrandr',
'../../build/linux/system.gyp:xi',
'../events/devices/events_devices.gyp:events_devices',
'../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
'../gfx/x/gfx_x11.gyp:gfx_x11',
],
}],
['OS=="win"', {
Expand Down
2 changes: 2 additions & 0 deletions ui/base/ui_base.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,9 @@
'../../build/linux/system.gyp:xext',
'../../build/linux/system.gyp:xfixes',
'../../build/linux/system.gyp:xrender', # For XRender* function calls in x11_util.cc.
'../events/devices/events_devices.gyp:events_devices',
'../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
'../gfx/x/gfx_x11.gyp:gfx_x11',
],
}],
['use_x11==1 and chromeos==0', {
Expand Down
1 change: 1 addition & 0 deletions ui/display/display.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
'conditions': [
['use_x11 == 1', {
'dependencies': [
'../../build/linux/system.gyp:x11',
'../../build/linux/system.gyp:xrandr',
'../../ui/gfx/x/gfx_x11.gyp:gfx_x11',
],
Expand Down
1 change: 1 addition & 0 deletions ui/events/events.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
['use_x11==1', {
'dependencies': [
'devices/events_devices.gyp:events_devices',
'../gfx/x/gfx_x11.gyp:gfx_x11',
'../../build/linux/system.gyp:x11',
],
}],
Expand Down
1 change: 1 addition & 0 deletions ui/events/platform/x11/x11_events_platform.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
'EVENTS_IMPLEMENTATION',
],
'dependencies': [
'../../../../base/base.gyp:base',
'../../../../build/linux/system.gyp:x11',
'../../../gfx/x/gfx_x11.gyp:gfx_x11',
'../../devices/events_devices.gyp:events_devices',
Expand Down
4 changes: 4 additions & 0 deletions ui/views/views.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@
'../../build/linux/system.gyp:xrandr',
'../events/devices/events_devices.gyp:events_devices',
'../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
'../gfx/x/gfx_x11.gyp:gfx_x11',
],
}],
['use_aura==1', {
Expand All @@ -698,6 +699,9 @@
}],
['use_x11 == 1', {
'sources': [ '<@(views_desktop_aura_x11_sources)' ],
'dependencies': [
'../../build/linux/system.gyp:xext',
],
}],
['OS == "win"', {
'sources': [ '<@(views_desktop_aura_win_sources)' ],
Expand Down
7 changes: 7 additions & 0 deletions ui/wm/wm.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@
'core/wm_state.h',
'wm_export.h',
],
'conditions': [
['use_x11==1', {
'dependencies': [
'../../build/linux/system.gyp:x11',
],
}],
],
},
{
# GN version: //ui/wm:test_support
Expand Down

0 comments on commit faffc1a

Please sign in to comment.