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
This commit is contained in:
kjellander@webrtc.org 2014-09-28 17:37:22 +00:00
parent 34f2a9ea72
commit f21ea918ad
23 changed files with 173 additions and 40 deletions

View File

@ -183,7 +183,8 @@ static_library("webrtc") {
"transport.h",
]
direct_dependent_configs = [ ":common_inherited_config"]
configs += [ ":common_config" ]
public_configs = [ ":common_inherited_config"]
deps = [
":webrtc_common",
@ -222,5 +223,6 @@ source_set("webrtc_common") {
configs -= [ "//build/config/clang:find_bad_constructs" ]
}
configs += [ ":common_inherited_config"]
configs += [ ":common_config" ]
public_configs = [ ":common_inherited_config" ]
}

View File

@ -82,7 +82,7 @@ if (is_linux && !build_with_chromium) {
} 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 @@ if (rtc_build_ssl == 0) {
# 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 @@ static_library("webrtc_base") {
":webrtc_base_config",
]
direct_dependent_configs = [
public_configs = [
"..:common_inherited_config",
":webrtc_base_config",
]
@ -306,7 +306,7 @@ static_library("webrtc_base") {
"../../boringssl/src/include",
]
direct_dependent_configs += [ ":webrtc_base_chromium_config" ]
public_configs += [ ":webrtc_base_chromium_config" ]
} else {
sources += [
"asyncinvoker.cc",
@ -445,7 +445,7 @@ static_library("webrtc_base") {
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 @@ static_library("webrtc_base") {
"opensslstreamadapter.h",
]
} else {
direct_dependent_configs += [ ":no_openssl_config" ]
public_configs += [ ":no_openssl_config" ]
sources += [
"nssidentity.cc",
"nssidentity.h",

View File

@ -135,7 +135,9 @@ source_set("common_audio") {
]
}
direct_dependent_configs = [
configs += [ "..:common_config" ]
public_configs = [
"..:common_inherited_config",
":common_audio_config",
]
@ -181,10 +183,9 @@ if (rtc_build_armv7_neon) {
"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.

View File

@ -32,7 +32,11 @@ source_set("common_video") {
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.

View File

@ -81,7 +81,12 @@ source_set("audio_coding") {
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 @@ source_set("cng") {
"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 @@ source_set("g711") {
"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 @@ source_set("g722") {
"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 @@ source_set("ilbc") {
"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 @@ source_set("isac") {
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 @@ source_set("isacfix") {
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 @@ if (rtc_build_armv7_neon) {
"-mfpu=neon",
]
configs += [ "../..:common_config" ]
public_configs = [ "../..:common_inherited_config" ]
deps = [ "../../common_audio" ]
}
}
@ -557,7 +593,12 @@ source_set("pcm16b") {
"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 @@ source_set("webrtc_opus") {
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 @@ source_set("neteq") {
"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" ]

View File

@ -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_set("audio_conference_mixer") {
"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.

View File

@ -37,8 +37,6 @@ source_set("audio_device") {
"dummy/file_audio_device.h",
]
direct_dependent_configs = [ ":audio_device_config"]
include_dirs = []
if (is_linux) {
include_dirs += [ "linux" ]
@ -166,6 +164,12 @@ source_set("audio_device") {
]
}
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.

View File

@ -79,7 +79,7 @@ source_set("audio_processing") {
]
configs += [ "../..:common_config" ]
direct_dependent_configs = [ "../..:common_inherited_config" ]
public_configs = [ "../..:common_inherited_config" ]
defines = []
deps = []
@ -179,7 +179,8 @@ if (cpu_arch == "x86" || cpu_arch == "x64") {
cflags = [ "-msse2" ]
configs += [ "../..:common_inherited_config" ]
configs += [ "../..:common_config" ]
public_configs = [ "../..:common_inherited_config" ]
}
}
@ -190,6 +191,9 @@ if (rtc_build_armv7_neon) {
"aec/aec_rdft_neon.c",
]
configs += [ "../..:common_config" ]
public_configs = [ "../..:common_inherited_config" ]
deps = [ "../../common_audio" ]
if (is_android || is_ios) {

View File

@ -24,6 +24,9 @@ source_set("bitrate_controller") {
]
}
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.

View File

@ -105,7 +105,8 @@ source_set("desktop_capture") {
]
}
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 @@ if (use_desktop_capture_differ_sse2) {
"differ_block_sse2.h",
]
configs += [ "../..:common_inherited_config"]
configs += [ "../..:common_config" ]
public_configs = [ "../..:common_inherited_config" ]
if (is_posix && !is_mac) {
cflags = ["-msse2"]

View File

@ -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 @@ source_set("media_file") {
]
}
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" ]
}

View File

@ -12,6 +12,9 @@ source_set("pacing") {
"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.

View File

@ -15,7 +15,8 @@ source_set("remote_bitrate_estimator") {
"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.

View File

@ -94,6 +94,9 @@ source_set("rtp_rtcp") {
"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.

View File

@ -30,6 +30,9 @@ source_set("utility") {
"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.

View File

@ -32,6 +32,9 @@ source_set("video_capture") {
"../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 @@ source_set("video_capture_impl") {
"../../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 @@ source_set("video_capture_internal_impl") {
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.

View File

@ -64,6 +64,9 @@ source_set("video_coding") {
"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 @@ source_set("video_coding_utility") {
"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 @@ source_set("webrtc_i420") {
"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 @@ source_set("webrtc_vp8") {
# "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.

View File

@ -45,6 +45,9 @@ source_set("video_processing") {
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 @@ if (build_video_processing_sse2) {
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.

View File

@ -28,6 +28,9 @@ source_set("video_render") {
"../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 @@ source_set("video_render_impl") {
"../../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 @@ source_set("video_render_internal_impl") {
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.

View File

@ -113,7 +113,7 @@ static_library("system_wrappers") {
configs -= [ "//build/config/clang:find_bad_constructs" ]
}
direct_dependent_configs = [
public_configs = [
"..:common_inherited_config",
":system_wrappers_inherited_config",
]
@ -201,6 +201,9 @@ source_set("field_trial_default") {
"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 @@ if (is_android) {
"source/cpu_features_android.c",
]
configs += [ "..:common_config" ]
public_configs = [ "..:common_inherited_config" ]
if (is_android_webview_build) {
libs += [ "cpufeatures.a" ]
} else {

View File

@ -25,7 +25,8 @@ source_set("video") {
"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.

View File

@ -86,6 +86,9 @@ source_set("video_engine_core") {
"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.

View File

@ -84,6 +84,9 @@ source_set("voice_engine") {
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.