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

Side by Side Diff: base/BUILD.gn

Issue 1675143004: Allocator shim skeleton + Linux impl behind a build flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shim_exp_flag
Patch Set: rebase Created 4 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 | « no previous file | base/allocator/BUILD.gn » ('j') | base/allocator/BUILD.gn » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # HOW TO WRITE CONDITIONALS IN THIS FILE 5 # HOW TO WRITE CONDITIONALS IN THIS FILE
6 # ====================================== 6 # ======================================
7 # 7 #
8 # In many other places, one would write a conditional that expresses all the 8 # In many other places, one would write a conditional that expresses all the
9 # cases when a source file is used or unused, and then either add or subtract 9 # cases when a source file is used or unused, and then either add or subtract
10 # it from the sources list in that case 10 # it from the sources list in that case
11 # 11 #
12 # Since base includes so many low-level things that vary widely and 12 # Since base includes so many low-level things that vary widely and
13 # unpredictably for the various build types, we prefer a slightly different 13 # unpredictably for the various build types, we prefer a slightly different
14 # style. Instead, there are big per-platform blocks of inclusions and 14 # style. Instead, there are big per-platform blocks of inclusions and
15 # exclusions. If a given file has an inclusion or exclusion rule that applies 15 # exclusions. If a given file has an inclusion or exclusion rule that applies
16 # for multiple conditions, perfer to duplicate it in both lists. This makes it 16 # for multiple conditions, perfer to duplicate it in both lists. This makes it
17 # a bit easier to see which files apply in which cases rather than having a 17 # a bit easier to see which files apply in which cases rather than having a
18 # huge sequence of random-looking conditionals. 18 # huge sequence of random-looking conditionals.
19 19
20 import("//build/buildflag_header.gni") 20 import("//build/buildflag_header.gni")
21 import("//build/config/allocator.gni")
21 import("//build/config/compiler/compiler.gni") 22 import("//build/config/compiler/compiler.gni")
22 import("//build/config/nacl/config.gni") 23 import("//build/config/nacl/config.gni")
23 import("//build/config/sysroot.gni") 24 import("//build/config/sysroot.gni")
24 import("//build/config/ui.gni") 25 import("//build/config/ui.gni")
25 import("//build/nocompile.gni") 26 import("//build/nocompile.gni")
26 import("//testing/test.gni") 27 import("//testing/test.gni")
27 28
28 declare_args() { 29 declare_args() {
29 # Override this value to give a specific build date. 30 # Override this value to give a specific build date.
30 # See //base/build_time.cc for more details. 31 # See //base/build_time.cc for more details.
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 966
966 configs += [ 967 configs += [
967 ":base_flags", 968 ":base_flags",
968 ":base_implementation", 969 ":base_implementation",
969 "//base/allocator:allocator_shim_define", # for allocator_check.cc. 970 "//base/allocator:allocator_shim_define", # for allocator_check.cc.
970 "//build/config:precompiled_headers", 971 "//build/config:precompiled_headers",
971 ] 972 ]
972 973
973 deps = [ 974 deps = [
974 "//base/allocator", 975 "//base/allocator",
976 "//base/allocator:features",
975 "//base/third_party/dynamic_annotations", 977 "//base/third_party/dynamic_annotations",
976 "//third_party/modp_b64", 978 "//third_party/modp_b64",
977 ] 979 ]
978 980
979 public_deps = [ 981 public_deps = [
980 ":base_paths", 982 ":base_paths",
981 ":base_static", 983 ":base_static",
982 ":build_date", 984 ":build_date",
983 ":debugging_flags", 985 ":debugging_flags",
984 ] 986 ]
985 987
986 # Needed for <atomic> if using newer C++ library than sysroot 988 # Needed for <atomic> if using newer C++ library than sysroot
987 if (!use_sysroot && (is_android || is_linux)) { 989 if (!use_sysroot && (is_android || is_linux)) {
988 libs = [ "atomic" ] 990 libs = [ "atomic" ]
989 } 991 }
990 992
993 if (use_experimental_allocator_shim) {
994 # The allocator shim is part of the base API. This is to allow clients of
995 # base should to install hooks into the allocator path.
996 public_deps += [ "//base/allocator:unified_allocator_shim" ]
997 }
998
991 # Allow more direct string conversions on platforms with native utf8 999 # Allow more direct string conversions on platforms with native utf8
992 # strings 1000 # strings
993 if (is_mac || is_ios || is_chromeos) { 1001 if (is_mac || is_ios || is_chromeos) {
994 defines += [ "SYSTEM_NATIVE_UTF8" ] 1002 defines += [ "SYSTEM_NATIVE_UTF8" ]
995 } 1003 }
996 1004
997 # Android. 1005 # Android.
998 if (is_android) { 1006 if (is_android) {
999 sources -= [ 1007 sources -= [
1000 "debug/stack_trace_posix.cc", 1008 "debug/stack_trace_posix.cc",
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 "trace_event/trace_event_android_unittest.cc", 1895 "trace_event/trace_event_android_unittest.cc",
1888 ] 1896 ]
1889 set_sources_assignment_filter(sources_assignment_filter) 1897 set_sources_assignment_filter(sources_assignment_filter)
1890 } 1898 }
1891 1899
1892 if (is_win && target_cpu == "x64") { 1900 if (is_win && target_cpu == "x64") {
1893 sources += [ "profiler/win32_stack_frame_unwinder_unittest.cc" ] 1901 sources += [ "profiler/win32_stack_frame_unwinder_unittest.cc" ]
1894 deps += [ ":base_profiler_test_support_library" ] 1902 deps += [ ":base_profiler_test_support_library" ]
1895 } 1903 }
1896 1904
1905 if (use_experimental_allocator_shim) {
1906 sources += [ "allocator/allocator_shim_unittest.cc" ]
1907 }
1908
1897 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 1909 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1898 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] 1910 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1899 1911
1900 # Symbols for crashes when running tests on swarming. 1912 # Symbols for crashes when running tests on swarming.
1901 if (symbol_level > 0) { 1913 if (symbol_level > 0) {
1902 if (is_win) { 1914 if (is_win) {
1903 data += [ "$root_out_dir/base_unittests.exe.pdb" ] 1915 data += [ "$root_out_dir/base_unittests.exe.pdb" ]
1904 } else if (is_mac) { 1916 } else if (is_mac) {
1905 data += [ "$root_out_dir/base_unittests.dSYM/" ] 1917 data += [ "$root_out_dir/base_unittests.dSYM/" ]
1906 } 1918 }
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
2095 2107
2096 # GYP: //base.gyp:base_java_unittest_support 2108 # GYP: //base.gyp:base_java_unittest_support
2097 android_library("base_java_unittest_support") { 2109 android_library("base_java_unittest_support") {
2098 deps = [ 2110 deps = [
2099 ":base_java", 2111 ":base_java",
2100 ] 2112 ]
2101 java_files = 2113 java_files =
2102 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ] 2114 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ]
2103 } 2115 }
2104 } 2116 }
OLDNEW
« no previous file with comments | « no previous file | base/allocator/BUILD.gn » ('j') | base/allocator/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698