Reland of "Decoupling rtc_base from Obj-C code"

Reason for revert:
Trying to fix the link error on the chromium FYI trybots.

Original issue's description:
> Revert of Decoupling rtc_base from Obj-C code (patchset #1 id:1 of https://codereview.webrtc.org/3004373002/ )
>
> Reason for revert:
> It breaks a chromium FYI trybot (the switch from rtc_static_library to rtc_source_set seems to be the problem).
>
> Original issue's description:
> > Reland of Decoupling rtc_base from Obj-C code (patchset #1 id:1 of https://codereview.webrtc.org/3008103002/ )
> >
> > Reason for revert:
> > Trying to reland after fixing downstream project.
> >
> > Original issue's description:
> > > Revert of Decoupling rtc_base from Obj-C code (patchset #8 id:140001 of https://codereview.webrtc.org/3001623003/ )
> > >
> > > Reason for revert:
> > > It breaks a downstream project.
> > >
> > > Original issue's description:
> > > > Decoupling rtc_base from Obj-C code
> > > >
> > > > The goal of this CL is to separate Obj-C/Obj-C++ code from targets which have
> > > > also C++ code (see https://bugs.chromium.org/p/webrtc/issues/detail?id=7743
> > > > for more information).
> > > >
> > > > To achieve this we have created 2 targets (rtc_base_objc and rtc_base_generic)
> > > > and rtc_base will act as a proxy between these targets (this way we can avoid a
> > > > circular dependency between rtc_base_generic and rtc_base_objc).
> > > >
> > > > BUG=webrtc:7743
> > > >
> > > > Review-Url: https://codereview.webrtc.org/3001623003
> > > > Cr-Commit-Position: refs/heads/master@{#19661}
> > > > Committed: a0a5b98937
> > >
> > > TBR=kjellander@webrtc.org,kwiberg@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:7743
> > >
> > > Review-Url: https://codereview.webrtc.org/3008103002
> > > Cr-Commit-Position: refs/heads/master@{#19664}
> > > Committed: 791a8f611d
> >
> > TBR=kjellander@webrtc.org,kwiberg@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=webrtc:7743
> >
> > Review-Url: https://codereview.webrtc.org/3004373002
> > Cr-Commit-Position: refs/heads/master@{#19681}
> > Committed: a0c893f324
>
> TBR=kjellander@webrtc.org,kwiberg@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7743
>
> Review-Url: https://codereview.webrtc.org/3007183002
> Cr-Commit-Position: refs/heads/master@{#19688}
> Committed: 9c5e511806

TBR=kjellander@webrtc.org,kwiberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7743

BUG=webrtc:7743

Review-Url: https://codereview.webrtc.org/3012823002
Cr-Commit-Position: refs/heads/master@{#19726}
This commit is contained in:
mbonadei 2017-09-07 07:36:28 -07:00 committed by Commit Bot
parent 05ec178808
commit 310e32b92a
3 changed files with 61 additions and 4 deletions

View File

@ -428,6 +428,35 @@ rtc_source_set("rtc_json") {
}
rtc_static_library("rtc_base") {
public_deps = [
":rtc_base_generic",
]
if (is_win) {
sources = [
"noop.cc",
]
}
if (is_ios || is_mac) {
sources = [
"noop.mm",
]
public_deps += [ ":rtc_base_objc" ]
}
}
if (is_ios || is_mac) {
rtc_source_set("rtc_base_objc") {
sources = [
"thread_darwin.mm",
]
deps = [
":rtc_base_generic",
]
visibility = [ ":rtc_base" ]
}
}
rtc_static_library("rtc_base_generic") {
cflags = []
cflags_cc = []
libs = []
@ -537,6 +566,11 @@ rtc_static_library("rtc_base") {
"thread.h",
]
visibility = [
":rtc_base",
":rtc_base_objc",
]
# TODO(henrike): issue 3307, make rtc_base build with the Chromium default
# compiler settings.
suppressed_configs += [ "//build/config/compiler:chromium_code" ]
@ -596,10 +630,7 @@ rtc_static_library("rtc_base") {
}
if (is_ios || is_mac) {
sources += [
"macifaddrs_converter.cc",
"thread_darwin.mm",
]
sources += [ "macifaddrs_converter.cc" ]
}
if (use_x11) {

13
webrtc/rtc_base/noop.cc Normal file
View File

@ -0,0 +1,13 @@
/*
* Copyright 2015 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
// This file is only needed to make ninja happy on some platforms.
// On some platforms it is not possible to link an rtc_static_library
// without any source file listed in the GN target.

13
webrtc/rtc_base/noop.mm Normal file
View File

@ -0,0 +1,13 @@
/*
* Copyright 2015 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
// This file is only needed to make ninja happy on some platforms.
// On some platforms it is not possible to link an rtc_static_library
// without any source file listed in the GN target.