Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: webrtc/base/BUILD.gn

Issue 2281513002: GN: Fix windows clang errors. Attempt 2. (Closed)
Patch Set: Revert mb_config.pyl. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/api/BUILD.gn ('k') | webrtc/examples/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license 3 # Use of this source code is governed by a BSD-style license
4 # that can be found in the LICENSE file in the root of the source 4 # that can be found in the LICENSE file in the root of the source
5 # tree. An additional intellectual property rights grant can be found 5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may 6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree. 7 # be found in the AUTHORS file in the root of the source tree.
8 8
9 import("//build/config/crypto.gni") 9 import("//build/config/crypto.gni")
10 import("//build/config/ui.gni") 10 import("//build/config/ui.gni")
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 "task_queue_gcd.cc", 229 "task_queue_gcd.cc",
230 "task_queue_posix.cc", 230 "task_queue_posix.cc",
231 ] 231 ]
232 } 232 }
233 if (is_win) { 233 if (is_win) {
234 sources += [ "task_queue_win.cc" ] 234 sources += [ "task_queue_win.cc" ]
235 } 235 }
236 } 236 }
237 } 237 }
238 238
239 config("rtc_base_warnings_config") {
240 if (is_win && is_clang) {
241 cflags = [
242 # Disable warnings failing when compiling with Clang on Windows.
243 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
244 "-Wno-sign-compare",
245 "-Wno-missing-braces",
246 ]
247 }
248 }
249
239 static_library("rtc_base") { 250 static_library("rtc_base") {
240 cflags = [] 251 cflags = []
241 cflags_cc = [] 252 cflags_cc = []
242 libs = [] 253 libs = []
243 deps = [ 254 deps = [
244 "..:webrtc_common", 255 "..:webrtc_common",
245 ] 256 ]
246 public_deps = [ 257 public_deps = [
247 ":rtc_base_approved", 258 ":rtc_base_approved",
248 ] 259 ]
249 260
250 configs += [ 261 configs += [
251 "..:common_config", 262 "..:common_config",
252 ":openssl_config", 263 ":openssl_config",
253 ":rtc_base_config", 264 ":rtc_base_config",
254 ] 265 ]
255 266
256 public_configs = [ 267 public_configs = [
257 "..:common_inherited_config", 268 "..:common_inherited_config",
258 ":openssl_config", 269 ":openssl_config",
259 ":rtc_base_config", 270 ":rtc_base_config",
260 ] 271 ]
261 272
262 all_dependent_configs = [ ":rtc_base_all_dependent_config" ] 273 all_dependent_configs = [ ":rtc_base_all_dependent_config" ]
263
264 defines = [ "LOGGING=1" ] 274 defines = [ "LOGGING=1" ]
265 275
266 sources = [ 276 sources = [
267 "arraysize.h", 277 "arraysize.h",
268 "asyncfile.cc", 278 "asyncfile.cc",
269 "asyncfile.h", 279 "asyncfile.h",
270 "asyncinvoker-inl.h", 280 "asyncinvoker-inl.h",
271 "asyncinvoker.cc", 281 "asyncinvoker.cc",
272 "asyncinvoker.h", 282 "asyncinvoker.h",
273 "asyncpacketsocket.cc", 283 "asyncpacketsocket.cc",
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 "thread.cc", 408 "thread.cc",
399 "thread.h", 409 "thread.h",
400 "timing.cc", 410 "timing.cc",
401 "timing.h", 411 "timing.h",
402 "urlencode.cc", 412 "urlencode.cc",
403 "urlencode.h", 413 "urlencode.h",
404 "worker.cc", 414 "worker.cc",
405 "worker.h", 415 "worker.h",
406 ] 416 ]
407 417
418 # TODO(henrike): issue 3307, make rtc_base build with the Chromium default
419 # compiler settings.
420 configs -= [ "//build/config/compiler:chromium_code" ]
421 configs += [ "//build/config/compiler:no_chromium_code" ]
422 if (!is_win) {
423 cflags += [ "-Wno-uninitialized" ]
424 }
425
408 if (build_with_chromium) { 426 if (build_with_chromium) {
409 if (is_win) { 427 if (is_win) {
410 sources += [ "../../webrtc_overrides/webrtc/base/win32socketinit.cc" ] 428 sources += [ "../../webrtc_overrides/webrtc/base/win32socketinit.cc" ]
411 } 429 }
412 430
413 include_dirs = [ 431 include_dirs = [
414 "../../webrtc_overrides", 432 "../../webrtc_overrides",
415 "../../boringssl/src/include", 433 "../../boringssl/src/include",
416 ] 434 ]
417 435
418 public_configs += [ ":rtc_base_chromium_config" ] 436 public_configs += [ ":rtc_base_chromium_config" ]
419 } else { 437 } else {
438 configs += [ ":rtc_base_warnings_config" ]
420 sources += [ 439 sources += [
421 "bandwidthsmoother.cc", 440 "bandwidthsmoother.cc",
422 "bandwidthsmoother.h", 441 "bandwidthsmoother.h",
423 "callback.h", 442 "callback.h",
424 "fileutils_mock.h", 443 "fileutils_mock.h",
425 "httpserver.cc", 444 "httpserver.cc",
426 "httpserver.h", 445 "httpserver.h",
427 "json.cc", 446 "json.cc",
428 "json.h", 447 "json.h",
429 "logsinks.cc", 448 "logsinks.cc",
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 "diskcache_win32.cc", 520 "diskcache_win32.cc",
502 "diskcache_win32.h", 521 "diskcache_win32.h",
503 "win32regkey.cc", 522 "win32regkey.cc",
504 "win32regkey.h", 523 "win32regkey.h",
505 "win32socketinit.cc", 524 "win32socketinit.cc",
506 "win32socketinit.h", 525 "win32socketinit.h",
507 "win32socketserver.cc", 526 "win32socketserver.cc",
508 "win32socketserver.h", 527 "win32socketserver.h",
509 ] 528 ]
510 } 529 }
511 if (is_win && is_clang) {
512 cflags += [
513 # Disable warnings failing when compiling with Clang on Windows.
514 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
515 "-Wno-sign-compare",
516 "-Wno-missing-braces",
517 ]
518 }
519 530
520 if (rtc_build_json) { 531 if (rtc_build_json) {
521 deps += [ "//third_party/jsoncpp" ] 532 deps += [ "//third_party/jsoncpp" ]
522 } else { 533 } else {
523 include_dirs = [ "$rtc_jsoncpp_root" ] 534 include_dirs = [ "$rtc_jsoncpp_root" ]
524 535
525 # When defined changes the include path for json.h to where it is 536 # When defined changes the include path for json.h to where it is
526 # expected to be when building json outside of the standalone build. 537 # expected to be when building json outside of the standalone build.
527 defines += [ "WEBRTC_EXTERNAL_JSON" ] 538 defines += [ "WEBRTC_EXTERNAL_JSON" ]
528 } 539 }
529 } # !build_with_chromium 540 } # !build_with_chromium
530 541
531 # TODO(henrike): issue 3307, make rtc_base build with the Chromium default
532 # compiler settings.
533 configs -= [ "//build/config/compiler:chromium_code" ]
534 configs += [ "//build/config/compiler:no_chromium_code" ]
535 if (!is_win) {
536 cflags += [ "-Wno-uninitialized" ]
537 }
538
539 if (rtc_build_ssl) { 542 if (rtc_build_ssl) {
540 deps += [ "//third_party/boringssl" ] 543 deps += [ "//third_party/boringssl" ]
541 } else { 544 } else {
542 configs += [ ":external_ssl_library" ] 545 configs += [ ":external_ssl_library" ]
543 } 546 }
544 547
545 if (is_android) { 548 if (is_android) {
546 sources += [ 549 sources += [
547 "ifaddrs-android.cc", 550 "ifaddrs-android.cc",
548 "ifaddrs-android.h", 551 "ifaddrs-android.h",
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 "linux.cc", 661 "linux.cc",
659 "linux.h", 662 "linux.h",
660 ] 663 ]
661 } 664 }
662 665
663 if (is_nacl) { 666 if (is_nacl) {
664 deps += [ "//native_client_sdk/src/libraries/nacl_io" ] 667 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
665 defines += [ "timezone=_timezone" ] 668 defines += [ "timezone=_timezone" ]
666 sources -= [ "ifaddrs_converter.cc" ] 669 sources -= [ "ifaddrs_converter.cc" ]
667 } 670 }
671 if (is_clang) {
672 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
673 configs -= [ "//build/config/clang:find_bad_constructs" ]
674 }
668 } 675 }
669 676
670 source_set("gtest_prod") { 677 source_set("gtest_prod") {
671 sources = [ 678 sources = [
672 "gtest_prod_util.h", 679 "gtest_prod_util.h",
673 ] 680 ]
674 } 681 }
675 682
676 if (rtc_include_tests) { 683 if (rtc_include_tests) {
677 config("rtc_base_tests_utils_exported_config") { 684 config("rtc_base_tests_utils_exported_config") {
678 defines = [ "GTEST_RELATIVE_PATH" ] 685 defines = [ "GTEST_RELATIVE_PATH" ]
679 } 686 }
680 687
688 config("rtc_base_tests_utils_warnings_config") {
689 if (is_win && is_clang) {
690 cflags = [
691 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270
692 "-Wno-reorder",
693 "-Wno-sign-compare",
694 ]
695 }
696 }
697
681 source_set("rtc_base_tests_utils") { 698 source_set("rtc_base_tests_utils") {
682 testonly = true 699 testonly = true
683 sources = [ 700 sources = [
684 # Also use this as a convenient dumping ground for misc files that are 701 # Also use this as a convenient dumping ground for misc files that are
685 # included by multiple targets below. 702 # included by multiple targets below.
686 "fakeclock.cc", 703 "fakeclock.cc",
687 "fakeclock.h", 704 "fakeclock.h",
688 "fakenetwork.h", 705 "fakenetwork.h",
689 "fakesslidentity.h", 706 "fakesslidentity.h",
690 "faketaskrunner.h", 707 "faketaskrunner.h",
691 "gunit.h", 708 "gunit.h",
692 "test/faketiming.h", 709 "test/faketiming.h",
693 "testbase64.h", 710 "testbase64.h",
694 "testechoserver.h", 711 "testechoserver.h",
695 "testutils.h", 712 "testutils.h",
696 "timedelta.h", 713 "timedelta.h",
697 "unittest_main.cc", 714 "unittest_main.cc",
698 ] 715 ]
699 configs += [ "..:common_config" ] 716 configs += [
717 "..:common_config",
718 ":rtc_base_tests_utils_warnings_config",
719 ]
700 public_configs = [ 720 public_configs = [
701 "..:common_inherited_config", 721 "..:common_inherited_config",
702 ":rtc_base_tests_utils_exported_config", 722 ":rtc_base_tests_utils_exported_config",
703 ] 723 ]
704 deps = [ 724 deps = [
705 ":rtc_base", 725 ":rtc_base",
706 "../test:field_trial", 726 "../test:field_trial",
707 "../test:test_support", 727 "../test:test_support",
708 ] 728 ]
709 public_deps = [ 729 public_deps = [
710 "//testing/gtest", 730 "//testing/gtest",
711 ] 731 ]
732
733 if (is_clang) {
734 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
735 configs -= [ "//build/config/clang:find_bad_constructs" ]
736 }
712 } 737 }
713 } 738 }
714 739
715 if (is_android) { 740 if (is_android) {
716 android_library("base_java") { 741 android_library("base_java") {
717 java_files = [ 742 java_files = [
718 "java/src/org/webrtc/Logging.java", 743 "java/src/org/webrtc/Logging.java",
719 "java/src/org/webrtc/Size.java", 744 "java/src/org/webrtc/Size.java",
720 "java/src/org/webrtc/ThreadUtils.java", 745 "java/src/org/webrtc/ThreadUtils.java",
721 ] 746 ]
722 747
723 deps = [ 748 deps = [
724 "//base:base_java", 749 "//base:base_java",
725 ] 750 ]
726 } 751 }
727 } 752 }
OLDNEW
« no previous file with comments | « webrtc/api/BUILD.gn ('k') | webrtc/examples/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698