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

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

Issue 2717083002: Enable GN check for webrtc/base (Closed)
Patch Set: Restore .gn change again Created 3 years, 9 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 | « .gn ('k') | no next file » | 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 if (!rtc_build_ssl) { 74 if (!rtc_build_ssl) {
75 config("external_ssl_library") { 75 config("external_ssl_library") {
76 assert(rtc_ssl_root != "", 76 assert(rtc_ssl_root != "",
77 "You must specify rtc_ssl_root when rtc_build_ssl==0.") 77 "You must specify rtc_ssl_root when rtc_build_ssl==0.")
78 include_dirs = [ rtc_ssl_root ] 78 include_dirs = [ rtc_ssl_root ]
79 } 79 }
80 } 80 }
81 81
82 # The subset of rtc_base approved for use outside of libjingle. 82 # The subset of rtc_base approved for use outside of libjingle.
83 rtc_static_library("rtc_base_approved") { 83 rtc_static_library("rtc_base_approved") {
84 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
85 # Enabling GN check triggers two cyclic dependency errors:
86 # :rtc_base_approved -> :rtc_base -> :rtc_base_approved
tommi 2017/03/31 08:38:29 where is the dependency from base_approved to base
kjellander_webrtc 2017/04/04 04:23:09 ERROR at //webrtc/base/md5digest.h:15:11: Include
tommi 2017/04/04 09:53:14 md5digest.h should not be in rtc_base_approved. I
kjellander_webrtc 2017/04/10 12:54:02 You're right that it's only used for audio tests.
87 # :rtc_base_approved -> //webrtc/system_wrappers -> :rtc_base_approved
88 check_includes = false
84 defines = [] 89 defines = []
85 libs = [] 90 libs = []
86 deps = [] 91 deps = []
87 all_dependent_configs = [ ":rtc_base_approved_all_dependent_config" ] 92 all_dependent_configs = [ ":rtc_base_approved_all_dependent_config" ]
88 93
89 sources = [ 94 sources = [
90 "array_view.h", 95 "array_view.h",
91 "arraysize.h", 96 "arraysize.h",
92 "atomicops.h", 97 "atomicops.h",
93 "base64.cc", 98 "base64.cc",
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 "$root_out_dir/ucrtbase${vcrt_suffix}.dll", 269 "$root_out_dir/ucrtbase${vcrt_suffix}.dll",
265 ] 270 ]
266 if (is_asan) { 271 if (is_asan) {
267 if (current_cpu == "x64") { 272 if (current_cpu == "x64") {
268 data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_r t.asan_dynamic-x86_64.dll" ] 273 data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_r t.asan_dynamic-x86_64.dll" ]
269 } else { 274 } else {
270 data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_r t.asan_dynamic-i386.dll" ] 275 data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_r t.asan_dynamic-i386.dll" ]
271 } 276 }
272 } 277 }
273 } 278 }
279 deps += [ "..:webrtc_common" ]
tommi 2017/03/08 13:36:45 base_approved shouldn't have any dependencies like
kjellander_webrtc 2017/03/08 13:56:04 Well, what I'm doing here is just adding what is a
tommi 2017/03/31 08:38:29 Ack. Is there information about this in the bug? (
kjellander_webrtc 2017/04/04 04:23:09 The referenced bug only deals with the enabling of
274 } 280 }
275 281
276 config("enable_libevent_config") { 282 config("enable_libevent_config") {
277 defines = [ "WEBRTC_BUILD_LIBEVENT" ] 283 defines = [ "WEBRTC_BUILD_LIBEVENT" ]
278 } 284 }
279 285
280 rtc_static_library("rtc_task_queue") { 286 rtc_static_library("rtc_task_queue") {
281 public_deps = [ 287 public_deps = [
282 ":rtc_base_approved", 288 ":rtc_base_approved",
283 ] 289 ]
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 # code over to Chrome. It should be deleted from webrtc soon. 358 # code over to Chrome. It should be deleted from webrtc soon.
353 rtc_static_library("rtc_task_runner") { 359 rtc_static_library("rtc_task_runner") {
354 sources = [ 360 sources = [
355 "task.cc", 361 "task.cc",
356 "task.h", 362 "task.h",
357 "taskparent.cc", 363 "taskparent.cc",
358 "taskparent.h", 364 "taskparent.h",
359 "taskrunner.cc", 365 "taskrunner.cc",
360 "taskrunner.h", 366 "taskrunner.h",
361 ] 367 ]
368 deps = [
369 ":rtc_base",
370 ":rtc_base_approved",
371 ]
362 } 372 }
363 373
364 rtc_static_library("rtc_base") { 374 rtc_static_library("rtc_base") {
365 cflags = [] 375 cflags = []
366 cflags_cc = [] 376 cflags_cc = []
367 libs = [] 377 libs = []
368 defines = [] 378 defines = []
369 deps = [ 379 deps = [
370 "..:webrtc_common", 380 "..:webrtc_common",
371 ] 381 ]
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 } 666 }
657 } 667 }
658 668
659 rtc_source_set("rtc_base_tests_main") { 669 rtc_source_set("rtc_base_tests_main") {
660 testonly = true 670 testonly = true
661 sources = [ 671 sources = [
662 "unittest_main.cc", 672 "unittest_main.cc",
663 ] 673 ]
664 public_configs = [ ":rtc_base_tests_utils_exported_config" ] 674 public_configs = [ ":rtc_base_tests_utils_exported_config" ]
665 deps = [ 675 deps = [
676 ":rtc_base",
677 ":rtc_base_approved",
666 ":rtc_base_tests_utils", 678 ":rtc_base_tests_utils",
679 "../test:field_trial",
680 "../test:test_support",
667 ] 681 ]
668 public_deps = [ 682 public_deps = [
669 "//testing/gmock", 683 "//testing/gmock",
670 "//testing/gtest", 684 "//testing/gtest",
671 ] 685 ]
672 686
673 if (!build_with_chromium && is_clang) { 687 if (!build_with_chromium && is_clang) {
674 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 688 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
675 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 689 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
676 } 690 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 "nullsocketserver_unittest.cc", 747 "nullsocketserver_unittest.cc",
734 "physicalsocketserver_unittest.cc", 748 "physicalsocketserver_unittest.cc",
735 "socket_unittest.cc", 749 "socket_unittest.cc",
736 "socket_unittest.h", 750 "socket_unittest.h",
737 "socketaddress_unittest.cc", 751 "socketaddress_unittest.cc",
738 "virtualsocket_unittest.cc", 752 "virtualsocket_unittest.cc",
739 ] 753 ]
740 deps = [ 754 deps = [
741 ":rtc_base", 755 ":rtc_base",
742 ":rtc_base_tests_main", 756 ":rtc_base_tests_main",
757 ":rtc_base_tests_utils",
758 "../system_wrappers:system_wrappers",
759 "../test:test_support",
743 "//testing/gtest", 760 "//testing/gtest",
744 ] 761 ]
745 if (is_win) { 762 if (is_win) {
746 sources += [ "win32socketserver_unittest.cc" ] 763 sources += [ "win32socketserver_unittest.cc" ]
747 } 764 }
748 765
749 if (!build_with_chromium && is_clang) { 766 if (!build_with_chromium && is_clang) {
750 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 767 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
751 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 768 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
752 } 769 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 "safe_compare_unittest.cc", 803 "safe_compare_unittest.cc",
787 "stringencode_unittest.cc", 804 "stringencode_unittest.cc",
788 "stringutils_unittest.cc", 805 "stringutils_unittest.cc",
789 "swap_queue_unittest.cc", 806 "swap_queue_unittest.cc",
790 "thread_annotations_unittest.cc", 807 "thread_annotations_unittest.cc",
791 "thread_checker_unittest.cc", 808 "thread_checker_unittest.cc",
792 "timestampaligner_unittest.cc", 809 "timestampaligner_unittest.cc",
793 "timeutils_unittest.cc", 810 "timeutils_unittest.cc",
794 ] 811 ]
795 deps = [ 812 deps = [
813 ":rtc_base",
796 ":rtc_base_approved", 814 ":rtc_base_approved",
797 ":rtc_base_tests_main", 815 ":rtc_base_tests_main",
816 ":rtc_base_tests_utils",
817 ":rtc_task_queue",
818 "../system_wrappers:system_wrappers",
819 "../test:test_support",
798 ] 820 ]
799 if (!build_with_chromium && is_clang) { 821 if (!build_with_chromium && is_clang) {
800 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 822 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
801 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 823 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
802 } 824 }
803 } 825 }
804 826
805 rtc_source_set("rtc_task_queue_unittests") { 827 rtc_source_set("rtc_task_queue_unittests") {
806 testonly = true 828 testonly = true
807 sources = [ 829 sources = [
808 "sequenced_task_checker_unittest.cc", 830 "sequenced_task_checker_unittest.cc",
809 "task_queue_unittest.cc", 831 "task_queue_unittest.cc",
810 "weak_ptr_unittest.cc", 832 "weak_ptr_unittest.cc",
811 ] 833 ]
812 deps = [ 834 deps = [
813 ":rtc_base_tests_main", 835 ":rtc_base_tests_main",
836 ":rtc_base_tests_utils",
814 ":rtc_task_queue", 837 ":rtc_task_queue",
838 "../test:test_support",
815 ] 839 ]
816 if (!build_with_chromium && is_clang) { 840 if (!build_with_chromium && is_clang) {
817 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 841 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
818 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 842 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
819 } 843 }
820 } 844 }
821 845
822 rtc_source_set("rtc_numerics_unittests") { 846 rtc_source_set("rtc_numerics_unittests") {
823 testonly = true 847 testonly = true
824 sources = [ 848 sources = [
825 "numerics/exp_filter_unittest.cc", 849 "numerics/exp_filter_unittest.cc",
826 "numerics/percentile_filter_unittest.cc", 850 "numerics/percentile_filter_unittest.cc",
827 ] 851 ]
828 deps = [ 852 deps = [
853 ":rtc_base_approved",
829 ":rtc_base_tests_main", 854 ":rtc_base_tests_main",
830 ":rtc_numerics", 855 ":rtc_numerics",
856 "../test:test_support",
831 ] 857 ]
832 } 858 }
833 859
834 config("rtc_base_unittests_config") { 860 config("rtc_base_unittests_config") {
835 if (is_clang) { 861 if (is_clang) {
836 cflags = [ "-Wno-unused-const-variable" ] 862 cflags = [ "-Wno-unused-const-variable" ]
837 } 863 }
838 } 864 }
839 rtc_source_set("rtc_base_unittests") { 865 rtc_source_set("rtc_base_unittests") {
840 testonly = true 866 testonly = true
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 } 902 }
877 if (is_posix) { 903 if (is_posix) {
878 sources += [ 904 sources += [
879 "ssladapter_unittest.cc", 905 "ssladapter_unittest.cc",
880 "sslidentity_unittest.cc", 906 "sslidentity_unittest.cc",
881 "sslstreamadapter_unittest.cc", 907 "sslstreamadapter_unittest.cc",
882 ] 908 ]
883 } 909 }
884 deps = [ 910 deps = [
885 ":rtc_base_tests_main", 911 ":rtc_base_tests_main",
912 ":rtc_base_tests_utils",
886 ":rtc_task_runner", 913 ":rtc_task_runner",
887 ] 914 ]
888 public_deps = [ 915 public_deps = [
889 ":rtc_base", 916 ":rtc_base",
890 ] 917 ]
891 configs += [ ":rtc_base_unittests_config" ] 918 configs += [ ":rtc_base_unittests_config" ]
892 if (!build_with_chromium && is_clang) { 919 if (!build_with_chromium && is_clang) {
893 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 920 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
894 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 921 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
895 } 922 }
896 } 923 }
897 } 924 }
898 925
899 if (is_android) { 926 if (is_android) {
900 android_library("base_java") { 927 android_library("base_java") {
901 java_files = [ 928 java_files = [
902 "java/src/org/webrtc/Logging.java", 929 "java/src/org/webrtc/Logging.java",
903 "java/src/org/webrtc/Size.java", 930 "java/src/org/webrtc/Size.java",
904 "java/src/org/webrtc/ThreadUtils.java", 931 "java/src/org/webrtc/ThreadUtils.java",
905 ] 932 ]
906 } 933 }
907 } 934 }
OLDNEW
« no previous file with comments | « .gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698