GN: Add common configs to all targets.
This is needed to ensure we have the same build with GN
as with GYP, since GYP includes the common.gypi on a global level.
Several fixes has been needed in the past because some code have
been built without the right defines.
BUG=3441
R=brettw@chromium.org
Review URL: https://webrtc-codereview.appspot.com/28589004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7317 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn
index a361fc2..0f6c09c 100644
--- a/webrtc/BUILD.gn
+++ b/webrtc/BUILD.gn
@@ -183,7 +183,8 @@
"transport.h",
]
- direct_dependent_configs = [ ":common_inherited_config"]
+ configs += [ ":common_config" ]
+ public_configs = [ ":common_inherited_config"]
deps = [
":webrtc_common",
@@ -222,5 +223,6 @@
configs -= [ "//build/config/clang:find_bad_constructs" ]
}
- configs += [ ":common_inherited_config"]
+ configs += [ ":common_config" ]
+ public_configs = [ ":common_inherited_config" ]
}
diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn
index 0de5ea4..3be8a3a 100644
--- a/webrtc/base/BUILD.gn
+++ b/webrtc/base/BUILD.gn
@@ -82,7 +82,7 @@
} else {
deps = [ "//net/third_party/nss/ssl:libssl" ]
- direct_dependent_configs = [
+ public_configs = [
"//net/third_party/nss/ssl:ssl_config",
"//third_party/nss:system_nss_no_ssl_config",
]
@@ -101,7 +101,7 @@
# The subset of rtc_base approved for use outside of libjingle.
static_library("rtc_base_approved") {
configs += [ "..:common_config" ]
- direct_dependent_configs = [ "..:common_inherited_config" ]
+ public_configs = [ "..:common_inherited_config" ]
sources = [
"checks.cc",
@@ -134,7 +134,7 @@
":webrtc_base_config",
]
- direct_dependent_configs = [
+ public_configs = [
"..:common_inherited_config",
":webrtc_base_config",
]
@@ -306,7 +306,7 @@
"../../boringssl/src/include",
]
- direct_dependent_configs += [ ":webrtc_base_chromium_config" ]
+ public_configs += [ ":webrtc_base_chromium_config" ]
} else {
sources += [
"asyncinvoker.cc",
@@ -445,7 +445,7 @@
cflags_cc += [ "-Wno-non-virtual-dtor" ]
if (use_openssl) {
- direct_dependent_configs += [ ":openssl_config" ]
+ public_configs += [ ":openssl_config" ]
if (rtc_build_ssl) {
deps += [ "//third_party/boringssl" ]
} else {
@@ -463,7 +463,7 @@
"opensslstreamadapter.h",
]
} else {
- direct_dependent_configs += [ ":no_openssl_config" ]
+ public_configs += [ ":no_openssl_config" ]
sources += [
"nssidentity.cc",
"nssidentity.h",
diff --git a/webrtc/common_audio/BUILD.gn b/webrtc/common_audio/BUILD.gn
index 036daa1..27f9bc8 100644
--- a/webrtc/common_audio/BUILD.gn
+++ b/webrtc/common_audio/BUILD.gn
@@ -135,7 +135,9 @@
]
}
- direct_dependent_configs = [
+ configs += [ "..:common_config" ]
+
+ public_configs = [
"..:common_inherited_config",
":common_audio_config",
]
@@ -181,10 +183,9 @@
"signal_processing/vector_scaling_operations_neon.S",
]
- configs += [
- "..:common_config",
- "..:common_inherited_config",
- ]
+ configs += [ "..:common_config" ]
+ public_configs = [ "..:common_inherited_config" ]
+
# Enable compilation for the ARM v7 Neon instruction set. This is needed
# since //build/config/arm.gni only enables Neon for iOS, not Android.
diff --git a/webrtc/common_video/BUILD.gn b/webrtc/common_video/BUILD.gn
index 1b9ad8c..d7f6dc2 100644
--- a/webrtc/common_video/BUILD.gn
+++ b/webrtc/common_video/BUILD.gn
@@ -32,7 +32,11 @@
include_dirs = [ "../modules/interface" ]
- direct_dependent_configs = [ ":common_video_config" ]
+ configs += [ "..:common_config" ]
+ public_configs = [
+ "..:common_inherited_config",
+ ":common_video_config",
+ ]
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn
index 8972ff9..b3c954d 100644
--- a/webrtc/modules/audio_coding/BUILD.gn
+++ b/webrtc/modules/audio_coding/BUILD.gn
@@ -81,7 +81,12 @@
defines = []
- direct_dependent_configs = [ ":audio_coding_config" ]
+ configs += [ "../..:common_config" ]
+
+ public_configs = [
+ "../..:common_inherited_config",
+ ":audio_coding_config",
+ ]
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
@@ -123,7 +128,12 @@
"codecs/cng/webrtc_cng.c",
]
- direct_dependent_configs = [ ":cng_config" ]
+ configs += [ "../..:common_config" ]
+
+ public_configs = [
+ "../..:common_inherited_config",
+ ":cng_config",
+ ]
deps = [ "../../common_audio" ]
}
@@ -143,7 +153,12 @@
"codecs/g711/g711.h",
]
- direct_dependent_configs = [ ":g711_config" ]
+ configs += [ "../..:common_config" ]
+
+ public_configs = [
+ "../..:common_inherited_config",
+ ":g711_config",
+ ]
}
config("g722_config") {
@@ -162,7 +177,12 @@
"codecs/g722/g722_enc_dec.h",
]
- direct_dependent_configs = [ ":g722_config" ]
+ configs += [ "../..:common_config" ]
+
+ public_configs = [
+ "../..:common_inherited_config",
+ ":g722_config",
+ ]
}
config("ilbc_config") {
@@ -315,7 +335,12 @@
"codecs/ilbc/xcorr_coef.h",
]
- direct_dependent_configs = [ ":ilbc_config" ]
+ configs += [ "../..:common_config" ]
+
+ public_configs = [
+ "../..:common_inherited_config",
+ ":ilbc_config",
+ ]
deps = [ "../../common_audio" ]
}
@@ -384,9 +409,12 @@
libs = [ "m" ]
}
- configs += [ "../..:common_inherited_config" ]
+ configs += [ "../..:common_config" ]
- direct_dependent_configs = [ ":isac_config" ]
+ public_configs = [
+ "../..:common_inherited_config",
+ ":isac_config",
+ ]
deps = [ "../../common_audio" ]
}
@@ -446,7 +474,12 @@
defines = [ "WEBRTC_LINUX" ]
}
- direct_dependent_configs = [ ":isac_fix_config" ]
+ configs += [ "../..:common_config" ]
+
+ public_configs = [
+ "../..:common_inherited_config",
+ ":isac_fix_config",
+ ]
deps = [
"../../common_audio",
@@ -540,6 +573,9 @@
"-mfpu=neon",
]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
deps = [ "../../common_audio" ]
}
}
@@ -557,7 +593,12 @@
"codecs/pcm16b/pcm16b.c",
]
- direct_dependent_configs = [ ":pcm16b_config" ]
+ configs += [ "../..:common_config" ]
+
+ public_configs = [
+ "../..:common_inherited_config",
+ ":pcm16b_config",
+ ]
}
config("opus_config") {
@@ -573,7 +614,8 @@
if (build_with_mozilla) {
include_dirs = [ getenv("DIST") + "/include/opus" ]
} else {
- configs += [ "../..:common_inherited_config" ]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
deps = [ "//third_party/opus" ]
}
@@ -658,7 +700,12 @@
"neteq/time_stretch.h",
]
- direct_dependent_configs = [ ":neteq_config" ]
+ configs += [ "../..:common_config" ]
+
+ public_configs = [
+ "../..:common_inherited_config",
+ ":neteq_config",
+ ]
forward_dependent_configs_from = [ "//third_party/opus" ]
diff --git a/webrtc/modules/audio_conference_mixer/BUILD.gn b/webrtc/modules/audio_conference_mixer/BUILD.gn
index a94d005..31f2e9a 100644
--- a/webrtc/modules/audio_conference_mixer/BUILD.gn
+++ b/webrtc/modules/audio_conference_mixer/BUILD.gn
@@ -6,7 +6,7 @@
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
-config("internal_config") {
+config("audio_conference_mixer_config") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
include_dirs = [
"interface",
@@ -31,7 +31,12 @@
"source/time_scheduler.h",
]
- direct_dependent_configs = [ ":internal_config" ]
+ configs += [ "../..:common_config" ]
+
+ public_configs = [
+ "../..:common_inherited_config",
+ ":audio_conference_mixer_config",
+ ]
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
diff --git a/webrtc/modules/audio_device/BUILD.gn b/webrtc/modules/audio_device/BUILD.gn
index 60a83dc..ce62ee4 100644
--- a/webrtc/modules/audio_device/BUILD.gn
+++ b/webrtc/modules/audio_device/BUILD.gn
@@ -37,8 +37,6 @@
"dummy/file_audio_device.h",
]
- direct_dependent_configs = [ ":audio_device_config"]
-
include_dirs = []
if (is_linux) {
include_dirs += [ "linux" ]
@@ -166,6 +164,12 @@
]
}
+ configs += [ "../..:common_config" ]
+ public_configs = [
+ "../..:common_inherited_config",
+ ":audio_device_config",
+ ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
diff --git a/webrtc/modules/audio_processing/BUILD.gn b/webrtc/modules/audio_processing/BUILD.gn
index 9bf4da0..d631adc 100644
--- a/webrtc/modules/audio_processing/BUILD.gn
+++ b/webrtc/modules/audio_processing/BUILD.gn
@@ -79,7 +79,7 @@
]
configs += [ "../..:common_config" ]
- direct_dependent_configs = [ "../..:common_inherited_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
defines = []
deps = []
@@ -179,7 +179,8 @@
cflags = [ "-msse2" ]
- configs += [ "../..:common_inherited_config" ]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
}
}
@@ -190,6 +191,9 @@
"aec/aec_rdft_neon.c",
]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
deps = [ "../../common_audio" ]
if (is_android || is_ios) {
diff --git a/webrtc/modules/bitrate_controller/BUILD.gn b/webrtc/modules/bitrate_controller/BUILD.gn
index d4d8f68..96a3782 100644
--- a/webrtc/modules/bitrate_controller/BUILD.gn
+++ b/webrtc/modules/bitrate_controller/BUILD.gn
@@ -24,6 +24,9 @@
]
}
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
diff --git a/webrtc/modules/desktop_capture/BUILD.gn b/webrtc/modules/desktop_capture/BUILD.gn
index 10219b5..2a1eedd 100644
--- a/webrtc/modules/desktop_capture/BUILD.gn
+++ b/webrtc/modules/desktop_capture/BUILD.gn
@@ -105,7 +105,8 @@
]
}
- direct_dependent_configs = [ "../..:common_inherited_config"]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config"]
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
@@ -133,7 +134,8 @@
"differ_block_sse2.h",
]
- configs += [ "../..:common_inherited_config"]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
if (is_posix && !is_mac) {
cflags = ["-msse2"]
diff --git a/webrtc/modules/media_file/BUILD.gn b/webrtc/modules/media_file/BUILD.gn
index 6f49dcd..0f97d07 100644
--- a/webrtc/modules/media_file/BUILD.gn
+++ b/webrtc/modules/media_file/BUILD.gn
@@ -8,7 +8,7 @@
import("../../build/webrtc.gni")
-config("internal_config") {
+config("media_file_config") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
include_dirs = [
"interface",
@@ -35,13 +35,17 @@
]
}
+ configs += [ "../..:common_config" ]
+ public_configs = [
+ "../..:common_inherited_config",
+ ":media_file_config",
+ ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
configs -= [ "//build/config/clang:find_bad_constructs" ]
}
- direct_dependent_configs = [ ":internal_config" ]
-
deps = [ "../../system_wrappers" ]
}
diff --git a/webrtc/modules/pacing/BUILD.gn b/webrtc/modules/pacing/BUILD.gn
index 7c451d6..58a73ae 100644
--- a/webrtc/modules/pacing/BUILD.gn
+++ b/webrtc/modules/pacing/BUILD.gn
@@ -12,6 +12,9 @@
"paced_sender.cc",
]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
diff --git a/webrtc/modules/remote_bitrate_estimator/BUILD.gn b/webrtc/modules/remote_bitrate_estimator/BUILD.gn
index 36af77ed..a7a45bd 100644
--- a/webrtc/modules/remote_bitrate_estimator/BUILD.gn
+++ b/webrtc/modules/remote_bitrate_estimator/BUILD.gn
@@ -15,7 +15,8 @@
"remote_rate_control.h",
]
- configs += [ "../../:common_inherited_config"]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
diff --git a/webrtc/modules/rtp_rtcp/BUILD.gn b/webrtc/modules/rtp_rtcp/BUILD.gn
index 2ee1a8f..65d5f38 100644
--- a/webrtc/modules/rtp_rtcp/BUILD.gn
+++ b/webrtc/modules/rtp_rtcp/BUILD.gn
@@ -94,6 +94,9 @@
"source/mock/mock_rtp_payload_strategy.h",
]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
diff --git a/webrtc/modules/utility/BUILD.gn b/webrtc/modules/utility/BUILD.gn
index ff32112..c1de77ef 100644
--- a/webrtc/modules/utility/BUILD.gn
+++ b/webrtc/modules/utility/BUILD.gn
@@ -30,6 +30,9 @@
"source/rtp_dump_impl.h",
]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
diff --git a/webrtc/modules/video_capture/BUILD.gn b/webrtc/modules/video_capture/BUILD.gn
index b9f3d2f..48b8fc0 100644
--- a/webrtc/modules/video_capture/BUILD.gn
+++ b/webrtc/modules/video_capture/BUILD.gn
@@ -32,6 +32,9 @@
"../utility",
]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
@@ -50,6 +53,9 @@
"../../system_wrappers",
]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
@@ -160,6 +166,9 @@
all_dependent_configs = [ ":video_capture_internal_impl_config" ]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
diff --git a/webrtc/modules/video_coding/BUILD.gn b/webrtc/modules/video_coding/BUILD.gn
index 42d5d5c..f101e2b 100644
--- a/webrtc/modules/video_coding/BUILD.gn
+++ b/webrtc/modules/video_coding/BUILD.gn
@@ -64,6 +64,9 @@
"main/source/video_sender.cc",
]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
@@ -85,6 +88,9 @@
"utility/frame_dropper.cc",
]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
@@ -100,6 +106,9 @@
"codecs/i420/main/interface/i420.h",
]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
@@ -126,6 +135,9 @@
# "codecs/vp8/vp8_impl.h",
]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
diff --git a/webrtc/modules/video_processing/BUILD.gn b/webrtc/modules/video_processing/BUILD.gn
index 42ef94b..56f9190 100644
--- a/webrtc/modules/video_processing/BUILD.gn
+++ b/webrtc/modules/video_processing/BUILD.gn
@@ -45,6 +45,9 @@
deps += [ ":video_processing_sse2" ]
}
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
@@ -56,7 +59,8 @@
source_set("video_processing_sse2") {
sources = [ "main/source/content_analysis_sse2.cc" ]
- configs += [ "../..:common_inherited_config" ]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
diff --git a/webrtc/modules/video_render/BUILD.gn b/webrtc/modules/video_render/BUILD.gn
index 84b73c5..4c5b921 100644
--- a/webrtc/modules/video_render/BUILD.gn
+++ b/webrtc/modules/video_render/BUILD.gn
@@ -28,6 +28,9 @@
"../utility",
]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
@@ -44,6 +47,9 @@
"../../system_wrappers",
]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
@@ -157,6 +163,9 @@
all_dependent_configs = [ ":video_render_internal_impl_config"]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
diff --git a/webrtc/system_wrappers/BUILD.gn b/webrtc/system_wrappers/BUILD.gn
index 262189c..14deab9 100644
--- a/webrtc/system_wrappers/BUILD.gn
+++ b/webrtc/system_wrappers/BUILD.gn
@@ -113,7 +113,7 @@
configs -= [ "//build/config/clang:find_bad_constructs" ]
}
- direct_dependent_configs = [
+ public_configs = [
"..:common_inherited_config",
":system_wrappers_inherited_config",
]
@@ -201,6 +201,9 @@
"source/field_trial_default.cc",
]
+ configs += [ "..:common_config" ]
+ public_configs = [ "..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
@@ -218,6 +221,9 @@
"source/cpu_features_android.c",
]
+ configs += [ "..:common_config" ]
+ public_configs = [ "..:common_inherited_config" ]
+
if (is_android_webview_build) {
libs += [ "cpufeatures.a" ]
} else {
diff --git a/webrtc/video/BUILD.gn b/webrtc/video/BUILD.gn
index f06d632..df9b20d 100644
--- a/webrtc/video/BUILD.gn
+++ b/webrtc/video/BUILD.gn
@@ -25,7 +25,8 @@
"video_send_stream.h",
]
- configs += [ "..:common_inherited_config" ]
+ configs += [ "..:common_config" ]
+ public_configs = [ "..:common_inherited_config" ]
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
diff --git a/webrtc/video_engine/BUILD.gn b/webrtc/video_engine/BUILD.gn
index 1b76776..debcd2f 100644
--- a/webrtc/video_engine/BUILD.gn
+++ b/webrtc/video_engine/BUILD.gn
@@ -86,6 +86,9 @@
"vie_sync_module.h",
]
+ configs += [ "..:common_config" ]
+ public_configs = [ "..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
diff --git a/webrtc/voice_engine/BUILD.gn b/webrtc/voice_engine/BUILD.gn
index f9c5f91..126d2c8 100644
--- a/webrtc/voice_engine/BUILD.gn
+++ b/webrtc/voice_engine/BUILD.gn
@@ -84,6 +84,9 @@
defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
}
+ configs += [ "..:common_config" ]
+ public_configs = [ "..:common_inherited_config" ]
+
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.