Revert of Cleanup webrtc/base/base.gyp (patchset #2 id:80001 of https://codereview.webrtc.org/1859803002/ )

Reason for revert:
For some odd reason this breaks chromium.webrtc.fyi bots:
../../third_party/webrtc_overrides/webrtc/base/win32socketinit.cc:13:2: error: "Only compile this on Windows"
#error "Only compile this on Windows"
 ^
1 error generated.

https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/11515/steps/compile/logs/stdio
https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/4650/steps/compile/logs/stdio

Original issue's description:
> Cleanup webrtc/base/base.gyp
>
> * Remove all source exclusions since they make the file very hard to
>   read and heavily increases the risk for mistakes.
> * Don't compile the openssl* sources if use_openssl==0.
> * Move platform specific sources into conditional includes to make it
>   easier to verify a 1:1 mapping with BUILD.gn (since GN doesn't support
>   automatic detection of platform specific sources based on filenames).
> * Add missing sources for the GN build.
> * Reorder some blocks to make GYP vs GN mapping match.
>
> BUG=webrtc:4256
> R=perkj@webrtc.org, torbjorng@webrtc.org
>
> Committed: https://crrev.com/47f33cb28ffb0fa0f053ae0aa0086e11f85bf444
> Cr-Commit-Position: refs/heads/master@{#12235}

TBR=perkj@webrtc.org,torbjorng@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:4256
NOTRY=True

Review URL: https://codereview.webrtc.org/1856323003

Cr-Commit-Position: refs/heads/master@{#12237}
This commit is contained in:
kjellander 2016-04-05 05:23:26 -07:00 committed by Commit bot
parent 9705bb81d6
commit c8587ad92d
2 changed files with 278 additions and 154 deletions

View File

@ -132,7 +132,6 @@ static_library("rtc_base_approved") {
"md5.h",
"md5digest.cc",
"md5digest.h",
"mod_ops.h",
"optional.h",
"platform_file.cc",
"platform_file.h",
@ -143,8 +142,6 @@ static_library("rtc_base_approved") {
"random.h",
"rate_statistics.cc",
"rate_statistics.h",
"ratetracker.cc",
"ratetracker.h",
"refcount.h",
"safe_conversions.h",
"safe_conversions_impl.h",
@ -187,9 +184,7 @@ static_library("rtc_base") {
cflags = []
cflags_cc = []
libs = []
deps = [
"..:webrtc_common",
]
deps = []
public_deps = [
":rtc_base_approved",
]
@ -262,6 +257,7 @@ static_library("rtc_base") {
"ipaddress.cc",
"ipaddress.h",
"linked_ptr.h",
"mathutils.h",
"messagedigest.cc",
"messagedigest.h",
"messagehandler.cc",
@ -275,15 +271,6 @@ static_library("rtc_base") {
"networkmonitor.cc",
"networkmonitor.h",
"nullsocketserver.h",
"openssl.h",
"openssladapter.cc",
"openssladapter.h",
"openssldigest.cc",
"openssldigest.h",
"opensslidentity.cc",
"opensslidentity.h",
"opensslstreamadapter.cc",
"opensslstreamadapter.h",
"pathutils.cc",
"pathutils.h",
"physicalsocketserver.cc",
@ -294,8 +281,12 @@ static_library("rtc_base") {
"proxyinfo.h",
"ratelimiter.cc",
"ratelimiter.h",
"ratetracker.cc",
"ratetracker.h",
"rtccertificate.cc",
"rtccertificate.h",
"scoped_autorelease_pool.h",
"scoped_autorelease_pool.mm",
"sha1.cc",
"sha1.h",
"sha1digest.cc",
@ -348,7 +339,22 @@ static_library("rtc_base") {
"worker.h",
]
if (is_posix) {
sources += [
"ifaddrs-android.h",
"ifaddrs_converter.cc",
"unixfilesystem.cc",
"unixfilesystem.h",
]
}
if (build_with_chromium) {
deps += [ "..:webrtc_common" ]
if (is_mac) {
sources += [ "macifaddrs_converter.cc" ]
}
if (is_win) {
sources += [ "../../webrtc_overrides/webrtc/base/win32socketinit.cc" ]
}
@ -368,6 +374,8 @@ static_library("rtc_base") {
"callback.h",
"callback.h.pump",
"fileutils_mock.h",
"genericslot.h",
"genericslot.h.pump",
"httpserver.cc",
"httpserver.h",
"json.cc",
@ -395,7 +403,6 @@ static_library("rtc_base") {
"sec_buffer.h",
"sslconfig.h",
"sslroots.h",
"testbase64.h",
"testclient.cc",
"testclient.h",
"transformadapter.cc",
@ -409,16 +416,7 @@ static_library("rtc_base") {
"windowpickerfactory.h",
]
if (is_linux) {
sources += [
"dbus.cc",
"dbus.h",
"libdbusglibsymboltable.cc",
"libdbusglibsymboltable.h",
"linuxfdwalk.c",
"linuxfdwalk.h",
]
}
deps += [ "..:webrtc_common" ]
if (is_posix) {
sources += [
@ -431,6 +429,17 @@ static_library("rtc_base") {
]
}
if (is_linux) {
sources += [
"dbus.cc",
"dbus.h",
"libdbusglibsymboltable.cc",
"libdbusglibsymboltable.h",
"linuxfdwalk.c",
"linuxfdwalk.h",
]
}
if (is_mac) {
sources += [
"macasyncsocket.cc",
@ -476,10 +485,23 @@ static_library("rtc_base") {
cflags_cc += [ "-Wno-non-virtual-dtor" ]
}
if (rtc_build_ssl) {
deps += [ "//third_party/boringssl" ]
} else {
configs += [ "external_ssl_library" ]
if (use_openssl) {
if (rtc_build_ssl) {
deps += [ "//third_party/boringssl" ]
} else {
configs += [ "external_ssl_library" ]
}
sources += [
"openssl.h",
"openssladapter.cc",
"openssladapter.h",
"openssldigest.cc",
"openssldigest.h",
"opensslidentity.cc",
"opensslidentity.h",
"opensslstreamadapter.cc",
"opensslstreamadapter.h",
]
}
if (is_android) {
@ -494,15 +516,14 @@ static_library("rtc_base") {
]
}
if (is_ios || is_mac) {
if (is_ios) {
all_dependent_configs = [ ":ios_config" ]
sources += [
"maccocoathreadhelper.h",
"maccocoathreadhelper.mm",
"macconversion.cc",
"macconversion.h",
"macifaddrs_converter.cc",
"scoped_autorelease_pool.h",
"scoped_autorelease_pool.mm",
]
}
@ -530,6 +551,10 @@ static_library("rtc_base") {
if (is_mac) {
sources += [
"maccocoathreadhelper.h",
"maccocoathreadhelper.mm",
"macconversion.cc",
"macconversion.h",
"macutils.cc",
"macutils.h",
]
@ -573,19 +598,11 @@ static_library("rtc_base") {
defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
}
if (is_posix) {
sources += [
"ifaddrs_converter.cc",
"ifaddrs_converter.h",
"unixfilesystem.cc",
"unixfilesystem.h",
]
if (is_debug) {
# The Chromium build/common.gypi defines this for all posix
# _except_ for ios & mac. We want it there as well, e.g.
# because ASSERT and friends trigger off of it.
defines += [ "_DEBUG" ]
}
if (is_posix && is_debug) {
# The Chromium build/common.gypi defines this for all posix
# _except_ for ios & mac. We want it there as well, e.g.
# because ASSERT and friends trigger off of it.
defines += [ "_DEBUG" ]
}
if (is_ios || (is_mac && current_cpu != "x86")) {
@ -607,8 +624,6 @@ static_library("rtc_base") {
}
if (is_ios) {
all_dependent_configs = [ ":ios_config" ]
source_set("rtc_base_objc") {
deps = [
":rtc_base",

View File

@ -9,7 +9,7 @@
{
'includes': [ '../build/common.gypi', ],
'conditions': [
['os_posix==1 and OS!="mac" and OS!="ios"', {
['os_posix == 1 and OS != "mac" and OS != "ios"', {
'conditions': [
['sysroot!=""', {
'variables': {
@ -100,6 +100,8 @@
'event_tracer.h',
'exp_filter.cc',
'exp_filter.h',
'logging.cc',
'logging.h',
'md5.cc',
'md5.h',
'md5digest.cc',
@ -150,8 +152,7 @@
'../../webrtc_overrides/webrtc/base/logging.cc',
'../../webrtc_overrides/webrtc/base/logging.h',
],
}, {
'sources': [
'sources!': [
'logging.cc',
'logging.h',
],
@ -193,20 +194,29 @@
'asyncudpsocket.h',
'autodetectproxy.cc',
'autodetectproxy.h',
'bandwidthsmoother.cc',
'bandwidthsmoother.h',
'base64.cc',
'base64.h',
'bind.h',
'callback.h',
'common.cc',
'common.h',
'crc32.cc',
'crc32.h',
'cryptstring.cc',
'cryptstring.h',
'dbus.cc',
'dbus.h',
'diskcache.cc',
'diskcache.h',
'diskcache_win32.cc',
'diskcache_win32.h',
'filerotatingstream.cc',
'filerotatingstream.h',
'fileutils.cc',
'fileutils.h',
'fileutils_mock.h',
'firewallsocketserver.cc',
'firewallsocketserver.h',
'flags.cc',
@ -224,16 +234,58 @@
'httpcommon.h',
'httprequest.cc',
'httprequest.h',
'httpserver.cc',
'httpserver.h',
'ifaddrs-android.cc',
'ifaddrs-android.h',
'ifaddrs_converter.cc',
'ifaddrs_converter.h',
'macifaddrs_converter.cc',
'iosfilesystem.mm',
'ipaddress.cc',
'ipaddress.h',
'json.cc',
'json.h',
'latebindingsymboltable.cc',
'latebindingsymboltable.h',
'libdbusglibsymboltable.cc',
'libdbusglibsymboltable.h',
'linux.cc',
'linux.h',
'linuxfdwalk.c',
'linuxfdwalk.h',
'linked_ptr.h',
'logsinks.cc',
'logsinks.h',
'macasyncsocket.cc',
'macasyncsocket.h',
'maccocoasocketserver.h',
'maccocoasocketserver.mm',
'maccocoathreadhelper.h',
'maccocoathreadhelper.mm',
'macconversion.cc',
'macconversion.h',
'macsocketserver.cc',
'macsocketserver.h',
'macutils.cc',
'macutils.h',
'macwindowpicker.cc',
'macwindowpicker.h',
'mathutils.h',
'messagedigest.cc',
'messagedigest.h',
'messagehandler.cc',
'messagehandler.h',
'messagequeue.cc',
'messagequeue.h',
'multipart.cc',
'multipart.h',
'natserver.cc',
'natserver.h',
'natsocketfactory.cc',
'natsocketfactory.h',
'nattypes.cc',
'nattypes.h',
'nethelpers.cc',
'nethelpers.h',
'network.cc',
@ -250,18 +302,32 @@
'opensslidentity.h',
'opensslstreamadapter.cc',
'opensslstreamadapter.h',
'optionsfile.cc',
'optionsfile.h',
'pathutils.cc',
'pathutils.h',
'physicalsocketserver.cc',
'physicalsocketserver.h',
'posix.cc',
'posix.h',
'profiler.cc',
'profiler.h',
'proxydetect.cc',
'proxydetect.h',
'proxyinfo.cc',
'proxyinfo.h',
'proxyserver.cc',
'proxyserver.h',
'ratelimiter.cc',
'ratelimiter.h',
'referencecountedsingletonfactory.h',
'rollingaccumulator.h',
'rtccertificate.cc',
'rtccertificate.h',
'scoped_autorelease_pool.h',
'scoped_autorelease_pool.mm',
'scopedptrcollection.h',
'sec_buffer.h',
'sha1.cc',
'sha1.h',
'sha1digest.cc',
@ -288,10 +354,12 @@
'socketstream.h',
'ssladapter.cc',
'ssladapter.h',
'sslconfig.h',
'sslfingerprint.cc',
'sslfingerprint.h',
'sslidentity.cc',
'sslidentity.h',
'sslroots.h',
'sslsocketfactory.cc',
'sslsocketfactory.h',
'sslstreamadapter.cc',
@ -304,14 +372,48 @@
'taskparent.h',
'taskrunner.cc',
'taskrunner.h',
'testclient.cc',
'testclient.h',
'thread.cc',
'thread.h',
'timing.cc',
'timing.h',
'transformadapter.cc',
'transformadapter.h',
'unixfilesystem.cc',
'unixfilesystem.h',
'urlencode.cc',
'urlencode.h',
'versionparsing.cc',
'versionparsing.h',
'virtualsocketserver.cc',
'virtualsocketserver.h',
'win32.cc',
'win32.h',
'win32filesystem.cc',
'win32filesystem.h',
'win32regkey.cc',
'win32regkey.h',
'win32securityerrors.cc',
'win32socketinit.cc',
'win32socketinit.h',
'win32socketserver.cc',
'win32socketserver.h',
'win32window.cc',
'win32window.h',
'win32windowpicker.cc',
'win32windowpicker.h',
'window.h',
'windowpicker.h',
'windowpickerfactory.h',
'winfirewall.cc',
'winfirewall.h',
'winping.cc',
'winping.h',
'worker.cc',
'worker.h',
'x11windowpicker.cc',
'x11windowpicker.h',
],
# TODO(henrike): issue 3307, make rtc_base build without disabling
# these flags.
@ -345,29 +447,41 @@
'sources': [
'../../webrtc_overrides/webrtc/base/win32socketinit.cc',
],
'defines': [
'NO_MAIN_THREAD_WRAPPING',
],
'direct_dependent_settings': {
'defines': [
'NO_MAIN_THREAD_WRAPPING',
],
},
}, {
'sources': [
'sources!': [
'bandwidthsmoother.cc',
'bandwidthsmoother.h',
'bind.h',
'bind.h.pump',
'callback.h',
'callback.h.pump',
'dbus.cc',
'dbus.h',
'diskcache_win32.cc',
'diskcache_win32.h',
'fileutils_mock.h',
'genericslot.h',
'httpserver.cc',
'httpserver.h',
'json.cc',
'json.h',
'latebindingsymboltable.cc',
'latebindingsymboltable.h',
'libdbusglibsymboltable.cc',
'libdbusglibsymboltable.h',
'linuxfdwalk.c',
'linuxfdwalk.h',
'x11windowpicker.cc',
'x11windowpicker.h',
'logging.cc',
'logging.h',
'logsinks.cc',
'logsinks.h',
'macasyncsocket.cc',
'macasyncsocket.h',
'maccocoasocketserver.h',
'maccocoasocketserver.mm',
'macsocketserver.cc',
'macsocketserver.h',
'macwindowpicker.cc',
'macwindowpicker.h',
'mathutils.h',
'multipart.cc',
'multipart.h',
@ -379,12 +493,16 @@
'nattypes.h',
'optionsfile.cc',
'optionsfile.h',
'posix.cc',
'posix.h',
'profiler.cc',
'profiler.h',
'proxyserver.cc',
'proxyserver.h',
'referencecountedsingletonfactory.h',
'rollingaccumulator.h',
'safe_conversions.h',
'safe_conversions_impl.h',
'scopedptrcollection.h',
'sec_buffer.h',
'sslconfig.h',
@ -398,10 +516,25 @@
'versionparsing.h',
'virtualsocketserver.cc',
'virtualsocketserver.h',
'win32regkey.cc',
'win32regkey.h',
'win32socketinit.cc',
'win32socketinit.h',
'win32socketserver.cc',
'win32socketserver.h',
'window.h',
'windowpicker.h',
'windowpickerfactory.h',
'windowpicker.h',
],
'defines': [
'NO_MAIN_THREAD_WRAPPING',
],
'direct_dependent_settings': {
'defines': [
'NO_MAIN_THREAD_WRAPPING',
],
},
}, {
'conditions': [
['build_json==1', {
'dependencies': [
@ -418,50 +551,6 @@
'WEBRTC_EXTERNAL_JSON',
],
}],
['OS=="linux"', {
'sources': [
'dbus.cc',
'dbus.h',
'libdbusglibsymboltable.cc',
'libdbusglibsymboltable.h',
'linuxfdwalk.c',
'linuxfdwalk.h',
],
}],
['os_posix==1', {
'sources': [
'latebindingsymboltable.cc',
'latebindingsymboltable.cc.def',
'latebindingsymboltable.h',
'latebindingsymboltable.h.def',
'posix.cc',
'posix.h',
],
}],
['OS=="mac"', {
'sources': [
'macasyncsocket.cc',
'macasyncsocket.h',
'maccocoasocketserver.h',
'maccocoasocketserver.mm',
'macsocketserver.cc',
'macsocketserver.h',
'macwindowpicker.cc',
'macwindowpicker.h',
],
}],
['OS=="win"', {
'sources': [
'diskcache_win32.cc',
'diskcache_win32.h',
'win32regkey.cc',
'win32regkey.h',
'win32socketinit.cc',
'win32socketinit.h',
'win32socketserver.cc',
'win32socketserver.h',
],
}],
['OS=="win" and clang==1', {
'msvs_settings': {
'VCCLCompilerTool': {
@ -474,32 +563,25 @@
},
},
}],
], # conditions
}], # build_with_chromium==0
['OS=="android"', {
'sources': [
'ifaddrs-android.cc',
'ifaddrs-android.h',
],
}],
['OS == "android"', {
'link_settings': {
'libraries': [
'-llog',
'-lGLESv2',
],
},
}],
['OS=="mac" or OS=="ios"', {
'sources': [
'maccocoathreadhelper.h',
'maccocoathreadhelper.mm',
'macconversion.cc',
'macconversion.h',
'macifaddrs_converter.cc',
'scoped_autorelease_pool.h',
'scoped_autorelease_pool.mm',
}, {
'sources!': [
'ifaddrs-android.cc',
'ifaddrs-android.h',
],
}],
['OS=="ios"', {
'sources/': [
['include', 'macconversion.*'],
],
'all_dependent_settings': {
'xcode_settings': {
'OTHER_LDFLAGS': [
@ -512,11 +594,7 @@
},
},
}],
['use_x11==1', {
'sources': [
'x11windowpicker.cc',
'x11windowpicker.h',
],
['use_x11 == 1', {
'link_settings': {
'libraries': [
'-ldl',
@ -527,6 +605,11 @@
'-lXrender',
],
},
}, {
'sources!': [
'x11windowpicker.cc',
'x11windowpicker.h',
],
}],
['OS=="linux"', {
'link_settings': {
@ -535,12 +618,16 @@
'-lrt',
],
},
}, {
'sources!': [
'dbus.cc',
'dbus.h',
'libdbusglibsymboltable.cc',
'libdbusglibsymboltable.h',
'linuxfdwalk.c',
],
}],
['OS=="mac"', {
'sources': [
'macutils.cc',
'macutils.h',
],
'all_dependent_settings': {
'link_settings': {
'xcode_settings': {
@ -567,22 +654,25 @@
},
}],
],
}, {
'sources!': [
'macasyncsocket.cc',
'macasyncsocket.h',
'maccocoasocketserver.h',
'maccocoasocketserver.mm',
'macconversion.cc',
'macconversion.h',
'macsocketserver.cc',
'macsocketserver.h',
'macutils.cc',
'macutils.h',
'macwindowpicker.cc',
'macwindowpicker.h',
],
}],
['OS=="win"', {
'sources': [
'win32.cc',
'win32.h',
'win32filesystem.cc',
'win32filesystem.h',
'win32securityerrors.cc',
'win32window.cc',
'win32window.h',
'win32windowpicker.cc',
'win32windowpicker.h',
'winfirewall.cc',
'winfirewall.h',
'winping.cc',
'winping.h',
'sources!': [
'ifaddrs_converter.cc',
],
'link_settings': {
'libraries': [
@ -596,14 +686,27 @@
'defines': [
'_CRT_NONSTDC_NO_DEPRECATE',
],
}, {
'sources/': [
['exclude', 'win32[a-z0-9]*\\.(h|cc)$'],
],
'sources!': [
'winping.cc',
'winping.h',
'winfirewall.cc',
'winfirewall.h',
],
}],
['os_posix==1', {
'sources': [
'ifaddrs_converter.cc',
'ifaddrs_converter.h',
['os_posix==0', {
'sources!': [
'latebindingsymboltable.cc',
'latebindingsymboltable.h',
'posix.cc',
'posix.h',
'unixfilesystem.cc',
'unixfilesystem.h',
],
}, {
'configurations': {
'Debug_Base': {
'defines': [
@ -620,8 +723,14 @@
'CARBON_DEPRECATED=YES',
],
}],
['OS=="linux" or OS=="android"', {
'sources': [
['OS!="ios" and OS!="mac"', {
'sources!': [
'macifaddrs_converter.cc',
'scoped_autorelease_pool.mm',
],
}],
['OS!="linux" and OS!="android"', {
'sources!': [
'linux.cc',
'linux.h',
],