diff options
author | jamesr <jamesr@chromium.org> | 2015-01-21 04:40:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-21 12:40:49 +0000 |
commit | 4359db72cde4fe4eeb4125d9a88af765fcdf39f1 (patch) | |
tree | 35ac4bdfde7715ef6b816666c4904d904544573f | |
parent | 6f4aa7e2069231cbe49995c87aab66c807de2926 (diff) | |
download | chromium_src-4359db72cde4fe4eeb4125d9a88af765fcdf39f1.zip chromium_src-4359db72cde4fe4eeb4125d9a88af765fcdf39f1.tar.gz chromium_src-4359db72cde4fe4eeb4125d9a88af765fcdf39f1.tar.bz2 |
GN: Add -Wl,-z defs on linux and fix errors
This tells the linker to resolve symbols for shared libraries at build
time, not run time. This alerts developers much earlier that their
dependencies are underspecified.
BUG=371125
Review URL: https://codereview.chromium.org/843583006
Cr-Commit-Position: refs/heads/master@{#312317}
-rw-r--r-- | ash/BUILD.gn | 10 | ||||
-rw-r--r-- | build/config/compiler/BUILD.gn | 1 | ||||
-rw-r--r-- | chrome/browser/ui/libgtk2ui/BUILD.gn | 17 | ||||
-rw-r--r-- | chrome/browser/ui/views/BUILD.gn | 2 | ||||
-rw-r--r-- | chrome/renderer/BUILD.gn | 6 | ||||
-rw-r--r-- | components/wallpaper/BUILD.gn | 1 | ||||
-rw-r--r-- | content/app/BUILD.gn | 1 | ||||
-rw-r--r-- | content/browser/BUILD.gn | 1 | ||||
-rw-r--r-- | content/test/BUILD.gn | 9 | ||||
-rw-r--r-- | device/vibration/android/BUILD.gn | 2 | ||||
-rw-r--r-- | gpu/config/BUILD.gn | 5 | ||||
-rw-r--r-- | media/BUILD.gn | 4 | ||||
-rw-r--r-- | media/cast/BUILD.gn | 1 | ||||
-rw-r--r-- | media/cdm/ppapi/BUILD.gn | 1 | ||||
-rw-r--r-- | sandbox/linux/BUILD.gn | 1 | ||||
-rw-r--r-- | ui/android/BUILD.gn | 5 | ||||
-rw-r--r-- | ui/aura/BUILD.gn | 7 | ||||
-rw-r--r-- | ui/base/BUILD.gn | 5 | ||||
-rw-r--r-- | ui/display/util/BUILD.gn | 5 | ||||
-rw-r--r-- | ui/events/platform/x11/BUILD.gn | 4 | ||||
-rw-r--r-- | ui/keyboard/BUILD.gn | 3 | ||||
-rw-r--r-- | ui/wm/BUILD.gn | 6 |
22 files changed, 82 insertions, 15 deletions
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index c9605a3..8ae17bc 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn @@ -64,7 +64,15 @@ component("ash") { } if (use_x11) { - configs += [ "//build/config/linux:xfixes" ] + configs += [ + "//build/config/linux:x11", + "//build/config/linux:xfixes", + ] + deps += [ + "//ui/events:gesture_detection", + "//ui/events/platform", + "//ui/gfx/x", + ] } else { sources -= [ "host/ash_window_tree_host_x11.cc", diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index c61964f..b5c4a90 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -301,6 +301,7 @@ config("compiler") { "-Wl,-z,noexecstack", "-Wl,-z,now", "-Wl,-z,relro", + "-Wl,-z,defs", ] } diff --git a/chrome/browser/ui/libgtk2ui/BUILD.gn b/chrome/browser/ui/libgtk2ui/BUILD.gn index 0f6c0c5..7614064 100644 --- a/chrome/browser/ui/libgtk2ui/BUILD.gn +++ b/chrome/browser/ui/libgtk2ui/BUILD.gn @@ -100,20 +100,33 @@ component("libgtk2ui") { ] } } - configs += [ ":libgtk2ui_warnings" ] + configs += [ + ":libgtk2ui_warnings", + "//build/config/linux:x11", + ] deps = [ "//base", - "//base:i18n", "//base/third_party/dynamic_annotations", + "//base:i18n", "//chrome/app/theme:theme_resources", "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", "//components/resources", + "//content/public/browser", + "//printing", "//skia", + "//third_party/mojo/src/mojo/edk/system", + "//ui/aura", "//ui/base", + "//ui/events", + "//ui/events:events_base", + "//ui/gfx", + "//ui/gfx/x", + "//ui/native_theme", "//ui/resources", + "//ui/shell_dialogs", "//ui/strings", "//ui/views", ] diff --git a/chrome/browser/ui/views/BUILD.gn b/chrome/browser/ui/views/BUILD.gn index 6239dc0..c012e65 100644 --- a/chrome/browser/ui/views/BUILD.gn +++ b/chrome/browser/ui/views/BUILD.gn @@ -36,6 +36,6 @@ component("views") { ] if (use_ash) { - #deps += [ "//ash" ] TODO(GYP) + deps += [ "//ash" ] } } diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn index 71410ef..2ffb869 100644 --- a/chrome/renderer/BUILD.gn +++ b/chrome/renderer/BUILD.gn @@ -119,6 +119,12 @@ static_library("renderer") { "//media/cast:sender", "//media/cast/logging/proto", ] + if (!enable_webrtc) { + sources -= [ + "media/cast_rtp_stream.cc", + "media/cast_rtp_stream.h", + ] + } } if (enable_webrtc) { sources += diff --git a/components/wallpaper/BUILD.gn b/components/wallpaper/BUILD.gn index ab3a325..e52d39f 100644 --- a/components/wallpaper/BUILD.gn +++ b/components/wallpaper/BUILD.gn @@ -18,6 +18,7 @@ component("wallpaper") { "//content", "//skia", "//ui/gfx", + "//ui/gfx/geometry", "//url", ] if (is_chromeos) { diff --git a/content/app/BUILD.gn b/content/app/BUILD.gn index 97c738e..251187b 100644 --- a/content/app/BUILD.gn +++ b/content/app/BUILD.gn @@ -43,6 +43,7 @@ if (is_win) { content_app_sources -= [ "content_main.cc" ] content_app_deps += [ "//content/public/android:jni", + "//device/vibration", "//skia", "//third_party/android_tools:cpu_features", "//ui/android", diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index 4a28a86..7bd3d3e 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn @@ -264,6 +264,7 @@ source_set("browser") { if (use_x11) { configs += [ "//build/config/linux:x11" ] + deps += [ "//ui/gfx/x" ] } # Dealing with power_save_blocker_{x11,ozone}.cc is a little complicated diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn index 9d92c88..64cf6b4 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn @@ -221,6 +221,13 @@ if (!is_ios) { if (is_android) { deps += [ ":jni" ] } + + if (!enable_webrtc) { + sources -= [ + "test_media_stream_renderer_factory.cc", + "test_media_stream_renderer_factory.h", + ] + } } if (is_android) { @@ -274,11 +281,11 @@ if (!is_mac) { "//ppapi:ppapi_ipc", "//ppapi:ppapi_proxy", "//ppapi:ppapi_shared", - "//third_party/mojo/src/mojo/edk/system", "//third_party/mojo/src/mojo/edk/test:test_support", "//third_party/mojo/src/mojo/public/cpp/bindings", "//third_party/mojo/src/mojo/public/js", + #"//ppapi:ppapi_tests", TODO(GYP) #"//ppapi:ppapi_unittest_shared", TODO(GYP) "//testing/gmock", diff --git a/device/vibration/android/BUILD.gn b/device/vibration/android/BUILD.gn index d0fa7e9..5d9aa22 100644 --- a/device/vibration/android/BUILD.gn +++ b/device/vibration/android/BUILD.gn @@ -13,6 +13,8 @@ source_set("android") { "vibration_jni_registrar.h", ] + defines = [ "DEVICE_VIBRATION_IMPLEMENTATION" ] + deps = [ # vibration_jni_registrar.cc includes a header from device/vibration # that includes a mojo-generated header file. Make sure the header diff --git a/gpu/config/BUILD.gn b/gpu/config/BUILD.gn index df7153d..be7a444 100644 --- a/gpu/config/BUILD.gn +++ b/gpu/config/BUILD.gn @@ -84,7 +84,10 @@ source_set("config") { "//build/config/linux:x11", "//build/config/linux:xext", ] - deps += [ "//third_party/libXNVCtrl" ] + deps += [ + "//third_party/libXNVCtrl", + "//ui/gfx/x", + ] } else { sources -= [ "gpu_info_collector_x11.cc" ] } diff --git a/media/BUILD.gn b/media/BUILD.gn index 774ef77..1ed1cb0 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -113,8 +113,6 @@ component("media") { "filters/decrypting_demuxer_stream.h", "filters/decrypting_video_decoder.cc", "filters/decrypting_video_decoder.h", - "filters/default_renderer_factory.cc", - "filters/default_renderer_factory.h", "filters/file_data_source.cc", "filters/file_data_source.h", "filters/frame_processor.cc", @@ -317,6 +315,8 @@ component("media") { if (!is_android) { sources += [ + "filters/default_renderer_factory.cc", + "filters/default_renderer_factory.h", "filters/opus_audio_decoder.cc", "filters/opus_audio_decoder.h", ] diff --git a/media/cast/BUILD.gn b/media/cast/BUILD.gn index 96a4cb2..629fcd9 100644 --- a/media/cast/BUILD.gn +++ b/media/cast/BUILD.gn @@ -52,6 +52,7 @@ source_set("common") { "//base", "//crypto", "//net", + "//third_party/zlib", ] } diff --git a/media/cdm/ppapi/BUILD.gn b/media/cdm/ppapi/BUILD.gn index 9d87a27..4879596 100644 --- a/media/cdm/ppapi/BUILD.gn +++ b/media/cdm/ppapi/BUILD.gn @@ -25,6 +25,7 @@ shared_library("clearkeycdm") { deps = [ "//base", + "//media", # For media::AudioTimestampHelper "//media:shared_memory_support", # For media::AudioBus. "//url", ] diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn index af3a950..21e19fd 100644 --- a/sandbox/linux/BUILD.gn +++ b/sandbox/linux/BUILD.gn @@ -193,6 +193,7 @@ component("seccomp_bpf_helpers") { deps = [ "//base", + ":sandbox_services", ":seccomp_bpf", ] } diff --git a/ui/android/BUILD.gn b/ui/android/BUILD.gn index f74ba7e..e496cb9 100644 --- a/ui/android/BUILD.gn +++ b/ui/android/BUILD.gn @@ -1,3 +1,7 @@ +# Copyright 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + import("//build/config/android/rules.gni") assert(is_android) @@ -22,6 +26,7 @@ component("android") { defines = [ "UI_ANDROID_IMPLEMENTATION" ] deps = [ + "//base", "//cc", "//skia", "//ui/gfx", diff --git a/ui/aura/BUILD.gn b/ui/aura/BUILD.gn index 21b0b27..1357a63 100644 --- a/ui/aura/BUILD.gn +++ b/ui/aura/BUILD.gn @@ -110,7 +110,12 @@ component("aura") { "//build/config/linux:x11", "//build/config/linux:xrandr", ] - deps += [ "//ui/events/platform/x11" ] + deps += [ + "//ui/events:events_base", + "//ui/events/devices", + "//ui/events/platform/x11", + "//ui/gfx/x", + ] } else { sources -= [ "window_tree_host_x11.cc", diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn index d3f64b6..3e59231 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -310,6 +310,7 @@ component("base") { "//base:i18n", "//net", "//third_party/icu", + "//ui/events", "//ui/events/devices", "//ui/resources", "//ui/strings", @@ -317,10 +318,6 @@ component("base") { ] if (build_ime) { - if (!is_android) { - deps += [ "//ui/events" ] - } - sources += [ "ime/candidate_window.cc", "ime/candidate_window.h", diff --git a/ui/display/util/BUILD.gn b/ui/display/util/BUILD.gn index 83f456d..ea007ca 100644 --- a/ui/display/util/BUILD.gn +++ b/ui/display/util/BUILD.gn @@ -26,7 +26,10 @@ component("util") { "x11/edid_parser_x11.cc", "x11/edid_parser_x11.h", ] - configs += [ "//build/config/linux:xrandr" ] + configs += [ + "//build/config/linux:x11", + "//build/config/linux:xrandr", + ] deps += [ "//ui/gfx/x" ] } if (is_chromeos) { diff --git a/ui/events/platform/x11/BUILD.gn b/ui/events/platform/x11/BUILD.gn index 85eaa5d..b36e144 100644 --- a/ui/events/platform/x11/BUILD.gn +++ b/ui/events/platform/x11/BUILD.gn @@ -26,6 +26,10 @@ component("x11") { "//ui/gfx/x", ] + deps = [ + "//base", + ] + if (is_linux) { sources -= [ "x11_event_source_libevent.cc" ] diff --git a/ui/keyboard/BUILD.gn b/ui/keyboard/BUILD.gn index 21d2417..b401972 100644 --- a/ui/keyboard/BUILD.gn +++ b/ui/keyboard/BUILD.gn @@ -41,11 +41,11 @@ component("keyboard") { "//content/public/browser", "//content/public/common", "//mojo/environment:chromium", + "//skia", "//third_party/mojo/src/mojo/edk/js", "//third_party/mojo/src/mojo/edk/system", "//third_party/mojo/src/mojo/public/cpp/bindings", "//third_party/mojo/src/mojo/public/cpp/system", - "//url", "//ui/aura", "//ui/base", "//ui/compositor", @@ -54,6 +54,7 @@ component("keyboard") { "//ui/gfx", "//ui/gfx/geometry", "//ui/wm", + "//url", ] } diff --git a/ui/wm/BUILD.gn b/ui/wm/BUILD.gn index ea50577..d5e3f29 100644 --- a/ui/wm/BUILD.gn +++ b/ui/wm/BUILD.gn @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/ui.gni") + component("wm") { sources = [ "core/accelerator_delegate.h", @@ -86,6 +88,10 @@ component("wm") { "//ui/gfx/geometry", "//ui/resources", ] + + if (use_x11) { + configs += [ "//build/config/linux:x11" ] + } } static_library("test_support") { |