Skip to content

Commit

Permalink
Revert of Enable GN check for webrtc/base (patchset JumpingYang001#9
Browse files Browse the repository at this point in the history
…id:350001 of https://codereview.webrtc.org/2840453004/ )

Reason for revert:
It causes a Chromium build error:

ERROR at //third_party/webrtc/test/BUILD.gn:113:5: Can't load input file.
    "//third_party/gflags",

Original issue's description:
> Reland of Enable GN check for webrtc/base (patchset JumpingYang001#3 id:230001 of https://codereview.webrtc.org/2838683002/ )
>
> Reason for revert:
> Try to fix the webrtc/test/fuzzers issue and reland this CL because it
> contains lots of fixes for our BUILD.gn files.
>
> Original issue's description:
> > Revert of Enable GN check for webrtc/base (patchset #13 id:240001 of https://codereview.webrtc.org/2717083002/ )
> >
> > Reason for revert:
> > Breaks Chromium because in Chromium we import WebRTC with rtc_include_tests=false (https://bugs.chromium.org/p/chromium/issues/detail?id=713179#c6).
> >
> > Chromium uses webrtc/test/fuzzers and this CL adds test dependencies to neteq_rtc_fuzzer.
> >
> > Original issue's description:
> > > Enable GN check for webrtc/base
> > >
> > > It's not possible to enable it for the rtc_base_approved
> > > target but since a larger refactoring is ongoing for webrtc/base
> > > this CL doesn't attempt to fix that.
> > >
> > > Changes made:
> > > * Move webrtc/system_wrappers/include/stringize_macros.h into
> > >   webrtc/base:rtc_base_approved_unittests (and corresponding
> > >   unit test to rtc_base_approved_unittests).
> > > * Move md5digest.* from rtc_base_approved to rtc_base_test_utils target.
> > > * Move webrtc/system_wrappers/include/stringize_macros.h (+test) into
> > >   webrtc/base.
> > > * Remove unused use include of webrtc/base/fileutils.h in
> > >   webrtc/base/pathutils.cc
> > >
> > > BUG=webrtc:6828, webrtc:3806, webrtc:7480
> > > NOTRY=True
> > >
> > > Review-Url: https://codereview.webrtc.org/2717083002
> > > Cr-Commit-Position: refs/heads/master@{#17766}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/ed754e71ae8866db641677073274e86fe704eeac
> >
> > [email protected],[email protected],[email protected],[email protected]
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:6828, webrtc:3806, webrtc:7480
> > NOTRY=True
> >
> > Review-Url: https://codereview.webrtc.org/2838683002
> > Cr-Commit-Position: refs/heads/master@{#17849}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/11ed366c487a938815cd52ad2ab5467b0f90e1ae
>
> [email protected],[email protected],[email protected],[email protected]
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6828, webrtc:3806, webrtc:7480
>
> Review-Url: https://codereview.webrtc.org/2840453004
> Cr-Commit-Position: refs/heads/master@{#17876}
> Committed: https://chromium.googlesource.com/external/webrtc/+/7054085e59c3123613cd0014bedb0fe91a56e26f

[email protected],[email protected],[email protected],[email protected]
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6828, webrtc:3806, webrtc:7480

Review-Url: https://codereview.webrtc.org/2846483002
Cr-Commit-Position: refs/heads/master@{#17877}
  • Loading branch information
MirkoBonadei authored and Commit bot committed Apr 26, 2017
1 parent 7054085 commit 3d7b0e2
Show file tree
Hide file tree
Showing 11 changed files with 164 additions and 191 deletions.
1 change: 0 additions & 1 deletion .gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ secondary_source = "//build/secondary/"
check_targets = [
"//webrtc/api/*",
"//webrtc/audio/*",
"//webrtc/base/*",
"//webrtc/call/*",
"//webrtc/common_video/*",
"//webrtc/common_audio/*",
Expand Down
148 changes: 62 additions & 86 deletions webrtc/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ source_set("protobuf_utils") {

# The subset of rtc_base approved for use outside of libjingle.
rtc_static_library("rtc_base_approved") {
# TODO(kjellander): Remove (bugs.webrtc.org/7480)
# Enabling GN check triggers a cyclic dependency caused by rate_limiter.cc:
# :rtc_base_approved -> //webrtc/system_wrappers -> :rtc_base_approved
check_includes = false
defines = []
libs = []
deps = []
Expand Down Expand Up @@ -140,6 +136,8 @@ rtc_static_library("rtc_base_approved") {
"location.h",
"md5.cc",
"md5.h",
"md5digest.cc",
"md5digest.h",
"mod_ops.h",
"onetimeevent.h",
"optional.cc",
Expand Down Expand Up @@ -174,7 +172,6 @@ rtc_static_library("rtc_base_approved") {
"string_to_number.h",
"stringencode.cc",
"stringencode.h",
"stringize_macros.h",
"stringutils.cc",
"stringutils.h",
"swap_queue.h",
Expand Down Expand Up @@ -658,84 +655,78 @@ rtc_source_set("gtest_prod") {
]
}

config("rtc_base_tests_utils_exported_config") {
defines = [ "GTEST_RELATIVE_PATH" ]
}

config("rtc_base_tests_utils_warnings_config") {
if (is_win && is_clang) {
cflags = [
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270
"-Wno-reorder",
"-Wno-sign-compare",
]
if (rtc_include_tests) {
config("rtc_base_tests_utils_exported_config") {
defines = [ "GTEST_RELATIVE_PATH" ]
}
}

rtc_source_set("rtc_base_tests_utils") {
testonly = true
sources = [
# Also use this as a convenient dumping ground for misc files that are
# included by multiple targets below.
"cpu_time.cc",
"cpu_time.h",
"fakeclock.cc",
"fakeclock.h",
"fakenetwork.h",
"fakesslidentity.h",
"firewallsocketserver.cc",
"firewallsocketserver.h",
"gunit.h",
"httpserver.cc",
"httpserver.h",
"md5digest.cc",
"md5digest.h",
"memory_usage.cc",
"memory_usage.h",
"natserver.cc",
"natserver.h",
"natsocketfactory.cc",
"natsocketfactory.h",
"nattypes.cc",
"nattypes.h",
"proxyserver.cc",
"proxyserver.h",
"sigslottester.h",
"sigslottester.h.pump",
"testbase64.h",
"testechoserver.h",
"testutils.h",
"timedelta.h",
]
configs += [ ":rtc_base_tests_utils_warnings_config" ]
public_configs = [ ":rtc_base_tests_utils_exported_config" ]
deps = [
":rtc_base",
"../test:field_trial",
"../test:test_support",
]
public_deps = [
"//testing/gmock",
"//testing/gtest",
]

if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
config("rtc_base_tests_utils_warnings_config") {
if (is_win && is_clang) {
cflags = [
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270
"-Wno-reorder",
"-Wno-sign-compare",
]
}
}
}

if (rtc_include_tests) {
rtc_source_set("rtc_base_tests_main") {
testonly = true
sources = [
"unittest_main.cc",
]
public_configs = [ ":rtc_base_tests_utils_exported_config" ]
deps = [
":rtc_base",
":rtc_base_approved",
":rtc_base_tests_utils",
]
public_deps = [
"//testing/gmock",
"//testing/gtest",
]

if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}

rtc_source_set("rtc_base_tests_utils") {
testonly = true
sources = [
# Also use this as a convenient dumping ground for misc files that are
# included by multiple targets below.
"cpu_time.cc",
"cpu_time.h",
"fakeclock.cc",
"fakeclock.h",
"fakenetwork.h",
"fakesslidentity.h",
"firewallsocketserver.cc",
"firewallsocketserver.h",
"gunit.h",
"httpserver.cc",
"httpserver.h",
"memory_usage.cc",
"memory_usage.h",
"natserver.cc",
"natserver.h",
"natsocketfactory.cc",
"natsocketfactory.h",
"nattypes.cc",
"nattypes.h",
"proxyserver.cc",
"proxyserver.h",
"sigslottester.h",
"sigslottester.h.pump",
"testbase64.h",
"testechoserver.h",
"testutils.h",
"timedelta.h",
]
configs += [ ":rtc_base_tests_utils_warnings_config" ]
public_configs = [ ":rtc_base_tests_utils_exported_config" ]
deps = [
":rtc_base",
"../test:field_trial",
"../test:test_support",
]
Expand Down Expand Up @@ -772,9 +763,6 @@ if (rtc_include_tests) {
deps = [
":rtc_base",
":rtc_base_tests_main",
":rtc_base_tests_utils",
"../system_wrappers:system_wrappers",
"../test:test_support",
"//testing/gtest",
]
if (is_win) {
Expand Down Expand Up @@ -829,7 +817,6 @@ if (rtc_include_tests) {
"safe_minmax_unittest.cc",
"string_to_number_unittest.cc",
"stringencode_unittest.cc",
"stringize_macros_unittest.cc",
"stringutils_unittest.cc",
"swap_queue_unittest.cc",
"thread_annotations_unittest.cc",
Expand All @@ -838,13 +825,8 @@ if (rtc_include_tests) {
"timeutils_unittest.cc",
]
deps = [
":rtc_base",
":rtc_base_approved",
":rtc_base_tests_main",
":rtc_base_tests_utils",
":rtc_task_queue",
"../system_wrappers:system_wrappers",
"../test:test_support",
]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
Expand All @@ -868,9 +850,7 @@ if (rtc_include_tests) {
]
deps = [
":rtc_base_tests_main",
":rtc_base_tests_utils",
":rtc_task_queue",
"../test:test_support",
]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
Expand All @@ -892,10 +872,8 @@ if (rtc_include_tests) {
"numerics/percentile_filter_unittest.cc",
]
deps = [
":rtc_base_approved",
":rtc_base_tests_main",
":rtc_numerics",
"../test:test_support",
]
}

Expand Down Expand Up @@ -961,8 +939,6 @@ if (rtc_include_tests) {
}
deps = [
":rtc_base_tests_main",
":rtc_base_tests_utils",
"../test:test_support",
]
public_deps = [
":rtc_base",
Expand Down
2 changes: 1 addition & 1 deletion webrtc/base/location.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <string>

#include "webrtc/base/stringize_macros.h"
#include "webrtc/system_wrappers/include/stringize_macros.h"

namespace rtc {

Expand Down
1 change: 1 addition & 0 deletions webrtc/base/pathutils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#endif // WEBRTC_WIN

#include "webrtc/base/checks.h"
#include "webrtc/base/fileutils.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/pathutils.h"
#include "webrtc/base/stringutils.h"
Expand Down
2 changes: 1 addition & 1 deletion webrtc/common_audio/resampler/sinc_resampler_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#include <algorithm>
#include <memory>

#include "webrtc/base/stringize_macros.h"
#include "webrtc/base/timeutils.h"
#include "webrtc/common_audio/resampler/sinc_resampler.h"
#include "webrtc/common_audio/resampler/sinusoidal_linear_chirp_source.h"
#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
#include "webrtc/system_wrappers/include/stringize_macros.h"
#include "webrtc/test/gmock.h"
#include "webrtc/test/gtest.h"

Expand Down
Loading

0 comments on commit 3d7b0e2

Please sign in to comment.