Reland "Set defines for Chromium"
This is a reland of https://codereview.webrtc.org/1847013002/ with the following changes: * _USE_32BIT_TIME_T is no longer set: it was removed from Chromium in https://codereview.chromium.org/1862443003/. Setting it in target_defaults was likely the reason to remoting_unittests failing in the previous attempt to land this. * Added define for FreeBSD platform. * Added corresponding GN changes. Copy the defines from the target_defaults section of Chromium's src/third_party/libjingle.gyp into our webrtc/build/common.gypi in order to ensure the same defines are used for the Chromium build when removing the source listings in src/third_party/libjingle.gyp. With this CL landed, it should be possible to replace them with dependencies on: * webrtc/api/api.gyp:libjingle_peerconnections * webrtc/media/media.gyp:rtc_media * webrtc/pc/pc.gyp:rtc_pc * webrtc/pp2/p2p.gyp:rtc_p2p * webrtc/libjingle/xmpp/xmpp.gyp:rtc_xmpp Not ported (Windows specific): * Precompiled headers (build/win_precompile.gypi): since it only seems to offer a compile speedup. Will be landed for all of WebRTC in separate CL. BUG=webrtc:4256 NOTRY=True Review-Url: https://codereview.webrtc.org/1924663003 Cr-Commit-Position: refs/heads/master@{#12959}
This commit is contained in:
parent
073eb7ed1e
commit
f0e174aab4
@ -21,7 +21,17 @@ config("common_inherited_config") {
|
||||
defines += [ "WEBRTC_MOZILLA_BUILD" ]
|
||||
}
|
||||
if (build_with_chromium) {
|
||||
defines = [ "WEBRTC_CHROMIUM_BUILD" ]
|
||||
defines = [
|
||||
# TODO(kjellander): Cleanup unused ones and move defines closer to
|
||||
# the source when webrtc:4256 is completed.
|
||||
"FEATURE_ENABLE_SSL",
|
||||
"FEATURE_ENABLE_VOICEMAIL",
|
||||
"EXPAT_RELATIVE_PATH",
|
||||
"GTEST_RELATIVE_PATH",
|
||||
"NO_MAIN_THREAD_WRAPPING",
|
||||
"NO_SOUND_SYSTEM",
|
||||
"WEBRTC_CHROMIUM_BUILD",
|
||||
]
|
||||
include_dirs = [
|
||||
# The overrides must be included first as that is the mechanism for
|
||||
# selecting the override headers in Chromium.
|
||||
@ -51,7 +61,10 @@ config("common_inherited_config") {
|
||||
defines += [ "WEBRTC_MAC" ]
|
||||
}
|
||||
if (is_win) {
|
||||
defines += [ "WEBRTC_WIN" ]
|
||||
defines += [
|
||||
"WEBRTC_WIN",
|
||||
"_CRT_SECURE_NO_WARNINGS", # Suppress warnings about _vsnprinf
|
||||
]
|
||||
}
|
||||
if (is_android) {
|
||||
defines += [
|
||||
@ -59,6 +72,20 @@ config("common_inherited_config") {
|
||||
"WEBRTC_ANDROID",
|
||||
]
|
||||
}
|
||||
if (is_chromeos) {
|
||||
defines += [ "CHROMEOS" ]
|
||||
}
|
||||
|
||||
# TODO(GYP): Support these in GN.
|
||||
# if (is_bsd) {
|
||||
# defines += [ "BSD" ]
|
||||
# }
|
||||
# if (is_openbsd) {
|
||||
# defines += [ "OPENBSD" ]
|
||||
# }
|
||||
# if (is_freebsd) {
|
||||
# defines += [ "FREEBSD" ]
|
||||
# }
|
||||
}
|
||||
|
||||
if (rtc_have_dbus_glib) {
|
||||
@ -70,8 +97,10 @@ if (rtc_have_dbus_glib) {
|
||||
config("common_config") {
|
||||
cflags = []
|
||||
cflags_cc = []
|
||||
defines = []
|
||||
|
||||
if (rtc_restrict_logging) {
|
||||
defines = [ "WEBRTC_RESTRICT_LOGGING" ]
|
||||
defines += [ "WEBRTC_RESTRICT_LOGGING" ]
|
||||
}
|
||||
|
||||
if (rtc_have_dbus_glib) {
|
||||
@ -85,7 +114,22 @@ config("common_config") {
|
||||
}
|
||||
|
||||
if (build_with_chromium) {
|
||||
defines += [ "LOGGING_INSIDE_WEBRTC" ]
|
||||
defines += [
|
||||
# NOTICE: Since common_inherited_config is used in public_configs for our
|
||||
# targets, there's no point including the defines in that config here.
|
||||
# TODO(kjellander): Cleanup unused ones and move defines closer to the
|
||||
# source when webrtc:4256 is completed.
|
||||
"ENABLE_EXTERNAL_AUTH",
|
||||
"HAVE_OPENSSL_SSL_H",
|
||||
"HAVE_SCTP",
|
||||
"HAVE_SRTP",
|
||||
"HAVE_WEBRTC_VIDEO",
|
||||
"HAVE_WEBRTC_VOICE",
|
||||
"LOGGING_INSIDE_WEBRTC",
|
||||
"SRTP_RELATIVE_PATH",
|
||||
"SSL_USE_OPENSSL",
|
||||
"USE_WEBRTC_DEV_BRANCH",
|
||||
]
|
||||
} else {
|
||||
if (is_posix) {
|
||||
# -Wextra is currently disabled in Chromium"s common.gypi. Enable
|
||||
|
||||
@ -280,8 +280,22 @@
|
||||
['build_with_chromium==1', {
|
||||
'defines': [
|
||||
# Changes settings for Chromium build.
|
||||
'WEBRTC_CHROMIUM_BUILD',
|
||||
# TODO(kjellander): Cleanup unused ones and move defines closer to the
|
||||
# source when webrtc:4256 is completed.
|
||||
'ENABLE_EXTERNAL_AUTH',
|
||||
'FEATURE_ENABLE_SSL',
|
||||
'HAVE_OPENSSL_SSL_H',
|
||||
'HAVE_SCTP',
|
||||
'HAVE_SRTP',
|
||||
'HAVE_WEBRTC_VIDEO',
|
||||
'HAVE_WEBRTC_VOICE',
|
||||
'LOGGING_INSIDE_WEBRTC',
|
||||
'NO_MAIN_THREAD_WRAPPING',
|
||||
'NO_SOUND_SYSTEM',
|
||||
'SRTP_RELATIVE_PATH',
|
||||
'SSL_USE_OPENSSL',
|
||||
'USE_WEBRTC_DEV_BRANCH',
|
||||
'WEBRTC_CHROMIUM_BUILD',
|
||||
],
|
||||
'include_dirs': [
|
||||
# Include the top-level directory when building in Chrome, so we can
|
||||
@ -460,6 +474,26 @@
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['chromeos==1', {
|
||||
'defines': [
|
||||
'CHROMEOS',
|
||||
],
|
||||
}],
|
||||
['os_bsd==1', {
|
||||
'defines': [
|
||||
'BSD',
|
||||
],
|
||||
}],
|
||||
['OS=="openbsd"', {
|
||||
'defines': [
|
||||
'OPENBSD',
|
||||
],
|
||||
}],
|
||||
['OS=="freebsd"', {
|
||||
'defines': [
|
||||
'FREEBSD',
|
||||
],
|
||||
}],
|
||||
['include_internal_audio_device==1', {
|
||||
'defines': [
|
||||
'WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE',
|
||||
@ -482,6 +516,14 @@
|
||||
['build_with_chromium==1', {
|
||||
'defines': [
|
||||
# Changes settings for Chromium build.
|
||||
# TODO(kjellander): Cleanup unused ones and move defines closer to
|
||||
# the source when webrtc:4256 is completed.
|
||||
'FEATURE_ENABLE_SSL',
|
||||
'FEATURE_ENABLE_VOICEMAIL',
|
||||
'EXPAT_RELATIVE_PATH',
|
||||
'GTEST_RELATIVE_PATH',
|
||||
'NO_MAIN_THREAD_WRAPPING',
|
||||
'NO_SOUND_SYSTEM',
|
||||
'WEBRTC_CHROMIUM_BUILD',
|
||||
],
|
||||
'include_dirs': [
|
||||
@ -509,6 +551,7 @@
|
||||
['OS=="win"', {
|
||||
'defines': [
|
||||
'WEBRTC_WIN',
|
||||
'_CRT_SECURE_NO_WARNINGS', # Suppress warnings about _vsnprinf
|
||||
],
|
||||
}],
|
||||
['OS=="linux"', {
|
||||
@ -529,6 +572,26 @@
|
||||
'WEBRTC_POSIX',
|
||||
],
|
||||
}],
|
||||
['chromeos==1', {
|
||||
'defines': [
|
||||
'CHROMEOS',
|
||||
],
|
||||
}],
|
||||
['os_bsd==1', {
|
||||
'defines': [
|
||||
'BSD',
|
||||
],
|
||||
}],
|
||||
['OS=="openbsd"', {
|
||||
'defines': [
|
||||
'OPENBSD',
|
||||
],
|
||||
}],
|
||||
['OS=="freebsd"', {
|
||||
'defines': [
|
||||
'FREEBSD',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
}, # target_defaults
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user