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

Unified Diff: base/BUILD.gn

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « apps/benchmark/event_unittest.cc ('k') | base/OWNERS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/BUILD.gn
diff --git a/base/BUILD.gn b/base/BUILD.gn
index eff163a61224a463e25e68a7aa330b048599b238..02d0bf91dc109757149c0a8d81eab62f54812b35 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -39,7 +39,7 @@ source_set("base_paths") {
"base_paths_win.h",
]
- if (is_android || is_mac) {
+ if (is_android || is_mac || is_ios) {
sources -= [ "base_paths_posix.cc" ]
}
@@ -83,6 +83,7 @@ component("base") {
"android/content_uri_utils.cc",
"android/content_uri_utils.h",
"android/cpu_features.cc",
+ "android/cxa_demangle_stub.cc",
"android/event_log.cc",
"android/event_log.h",
"android/field_trial_list.cc",
@@ -139,11 +140,8 @@ component("base") {
"atomic_ref_count.h",
"atomic_sequence_num.h",
"atomicops.h",
- "atomicops_internals_gcc.h",
"atomicops_internals_mac.h",
"atomicops_internals_portable.h",
- "atomicops_internals_x86_gcc.cc",
- "atomicops_internals_x86_gcc.h",
"atomicops_internals_x86_msvc.h",
"auto_reset.h",
"barrier_closure.cc",
@@ -177,6 +175,7 @@ component("base") {
"containers/linked_list.h",
"containers/mru_cache.h",
"containers/scoped_ptr_hash_map.h",
+ "containers/scoped_ptr_map.h",
"containers/small_map.h",
"containers/stack_container.h",
"cpu.cc",
@@ -270,6 +269,9 @@ component("base") {
"mac/bind_objc_block.h",
"mac/bundle_locations.h",
"mac/bundle_locations.mm",
+ "mac/call_with_eh_frame.cc",
+ "mac/call_with_eh_frame.h",
+ "mac/call_with_eh_frame_asm.S",
"mac/cocoa_protocols.h",
"mac/dispatch_source_mach.cc",
"mac/dispatch_source_mach.h",
@@ -320,10 +322,8 @@ component("base") {
"message_loop/incoming_task_queue.h",
"message_loop/message_loop.cc",
"message_loop/message_loop.h",
- "message_loop/message_loop_proxy.cc",
- "message_loop/message_loop_proxy.h",
- "message_loop/message_loop_proxy_impl.cc",
- "message_loop/message_loop_proxy_impl.h",
+ "message_loop/message_loop_task_runner.cc",
+ "message_loop/message_loop_task_runner.h",
"message_loop/message_pump.cc",
"message_loop/message_pump.h",
"message_loop/message_pump_android.cc",
@@ -364,7 +364,6 @@ component("base") {
"pending_task.h",
"pickle.cc",
"pickle.h",
- "port.h",
"posix/eintr_wrapper.h",
"posix/file_descriptor_shuffle.cc",
"posix/global_descriptors.cc",
@@ -427,6 +426,8 @@ component("base") {
"strings/latin1_string_conversions.h",
"strings/nullable_string16.cc",
"strings/nullable_string16.h",
+ "strings/pattern.cc",
+ "strings/pattern.h",
"strings/safe_sprintf.cc",
"strings/safe_sprintf.h",
"strings/string16.cc",
@@ -642,6 +643,8 @@ component("base") {
"sys_info_openbsd.cc",
]
+ data = []
+
configs += [ ":base_implementation" ]
deps = [
@@ -722,6 +725,11 @@ component("base") {
"sys_info.cc",
"sys_info_posix.cc",
]
+
+ # We build with a 10.9 min sdk version but lots of code in this directory is
+ # written to target a 10.6 min sdk version and thus depends on declarations
+ # marked as deprecated on 10.9+. Suppress these warnings for now.
+ cflags = [ "-Wno-deprecated-declarations" ]
} else {
# Remove NaCl stuff.
sources -= [
@@ -742,6 +750,30 @@ component("base") {
"sha1_win.cc",
]
+ # Required for base/stack_trace_win.cc to symbolize correctly.
+ data += [ "$root_build_dir/dbghelp.dll" ]
+
+ if (is_component_build) {
+ # Copy the VS runtime DLLs into the isolate so that they don't have to be
+ # preinstalled on the target machine. The debug runtimes have a "d" at
+ # the end.
+ if (is_debug) {
+ vcrt_suffix = "d"
+ } else {
+ vcrt_suffix = ""
+ }
+
+ # These runtime files are copied to the output directory by the
+ # vs_toolchain script that runs as part of toolchain configuration.
+ data += [
+ "$root_out_dir/msvcp120${vcrt_suffix}.dll",
+ "$root_out_dir/msvcr120${vcrt_suffix}.dll",
+ ]
+ if (is_asan) {
+ data += [ "//third_party/llvm-build/Release+Asserts/lib/clang/3.7.0/lib/windows/clang_rt.asan_dynamic-i386.dll" ]
+ }
+ }
+
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
@@ -758,17 +790,25 @@ component("base") {
}
# Mac.
- if (is_mac) {
+ if (is_mac || is_ios) {
+ # Common Desktop / iOS excludes
sources -= [
"native_library_posix.cc",
"strings/sys_string_conversions_posix.cc",
"threading/platform_thread_internal_posix.cc",
]
- # We build with a 10.9 min sdk version but lots of code in this directory is
- # written to target a 10.6 min sdk version and thus depends on declarations
- # marked as deprecated on 10.9+. Suppress these warnings for now.
- cflags = [ "-Wno-deprecated-declarations" ]
+ if (is_asan) {
+ # TODO(GYP) hook up asan on Mac. GYP has this extra dylib:
+ #data += [ "$root_out_dir/libclang_rt.asan_osx_dynamic.dylib" ]
+ }
+
+ if (is_ios) {
+ sources -= [
+ "files/file_path_watcher_fsevents.cc",
+ "files/file_path_watcher_fsevents.h",
+ ]
+ }
} else {
# Non-Mac.
sources -= [
@@ -781,6 +821,11 @@ component("base") {
# Linux.
if (is_linux) {
+ if (is_asan || is_lsan || is_msan || is_tsan) {
+ # For llvm-sanitizer.
+ data += [ "//third_party/llvm-build/Release+Asserts/lib/libstdc++.so.6" ]
+ }
+
# TODO(brettw) this will need to be parameterized at some point.
linux_configs = []
@@ -810,8 +855,60 @@ component("base") {
}
}
+ # iOS
+ if (is_ios) {
+ set_sources_assignment_filter([])
+
+ sources += [
+ "atomicops_internals_mac.h",
+ "base_paths_mac.h",
+ "base_paths_mac.mm",
+ "file_version_info_mac.h",
+ "file_version_info_mac.mm",
+ "files/file_util_mac.mm",
+ "mac/bundle_locations.h",
+ "mac/bundle_locations.mm",
+ "mac/call_with_eh_frame.cc",
+ "mac/call_with_eh_frame.h",
+ "mac/foundation_util.h",
+ "mac/foundation_util.mm",
+ "mac/mac_logging.cc",
+ "mac/mac_logging.h",
+ "mac/mach_logging.cc",
+ "mac/mach_logging.h",
+ "mac/objc_property_releaser.h",
+ "mac/objc_property_releaser.mm",
+ "mac/scoped_mach_port.cc",
+ "mac/scoped_mach_port.h",
+ "mac/scoped_mach_vm.cc",
+ "mac/scoped_mach_vm.h",
+ "mac/scoped_nsautorelease_pool.h",
+ "mac/scoped_nsautorelease_pool.mm",
+ "mac/scoped_nsobject.h",
+ "mac/scoped_objc_class_swizzler.h",
+ "mac/scoped_objc_class_swizzler.mm",
+ "message_loop/message_pump_mac.h",
+ "message_loop/message_pump_mac.mm",
+ "strings/sys_string_conversions_mac.mm",
+ "threading/platform_thread_mac.mm",
+ "time/time_mac.cc",
+ ]
+
+ set_sources_assignment_filter(sources_assignment_filter)
+ }
+
+ if (is_asan || is_lsan || is_msan || is_tsan) {
+ data += [ "//tools/valgrind/asan/" ]
+ if (is_win) {
+ data +=
+ [ "//third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer.exe" ]
+ } else {
+ data += [ "//third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer" ]
+ }
+ }
+
configs += [ "//build/config/compiler:wexit_time_destructors" ]
- if (is_android && !is_debug) {
+ if (!is_debug) {
configs -= [ "//build/config/compiler:optimize" ]
configs += [ "//build/config/compiler:optimize_max" ]
}
@@ -830,7 +927,7 @@ source_set("base_static") {
"win/pe_image.h",
]
- if (is_android && !is_debug) {
+ if (!is_debug) {
configs -= [ "//build/config/compiler:optimize" ]
configs += [ "//build/config/compiler:optimize_max" ]
}
@@ -883,7 +980,7 @@ component("i18n") {
"//third_party/icu",
]
- if (is_android && !is_debug) {
+ if (!is_debug) {
configs -= [ "//build/config/compiler:optimize" ]
configs += [ "//build/config/compiler:optimize_max" ]
}
@@ -995,7 +1092,7 @@ component("prefs") {
":base",
]
- if (is_android && !is_debug) {
+ if (!is_debug) {
configs -= [ "//build/config/compiler:optimize" ]
configs += [ "//build/config/compiler:optimize_max" ]
}
@@ -1056,6 +1153,15 @@ if (is_win) {
}
}
+# TODO(GYP): Delete this after we've converted everything to GN.
+# The _run targets exist only for compatibility w/ GYP.
+group("base_unittests_run") {
+ testonly = true
+ deps = [
+ ":base_unittests",
+ ]
+}
+
test("base_unittests") {
sources = [
"android/application_status_listener_unittest.cc",
@@ -1089,6 +1195,7 @@ test("base_unittests") {
"containers/linked_list_unittest.cc",
"containers/mru_cache_unittest.cc",
"containers/scoped_ptr_hash_map_unittest.cc",
+ "containers/scoped_ptr_map_unittest.cc",
"containers/small_map_unittest.cc",
"containers/stack_container_unittest.cc",
"cpu_unittest.cc",
@@ -1136,6 +1243,7 @@ test("base_unittests") {
"lazy_instance_unittest.cc",
"logging_unittest.cc",
"mac/bind_objc_block_unittest.mm",
+ "mac/call_with_eh_frame_unittest.mm",
"mac/dispatch_source_mach_unittest.cc",
"mac/foundation_util_unittest.mm",
"mac/libdispatch_task_runner_unittest.cc",
@@ -1159,8 +1267,7 @@ test("base_unittests") {
"memory/singleton_unittest.cc",
"memory/weak_ptr_unittest.cc",
"memory/weak_ptr_unittest.nc",
- "message_loop/message_loop_proxy_impl_unittest.cc",
- "message_loop/message_loop_proxy_unittest.cc",
+ "message_loop/message_loop_task_runner_unittest.cc",
"message_loop/message_loop_unittest.cc",
"message_loop/message_pump_io_ios_unittest.cc",
"metrics/bucket_ranges_unittest.cc",
@@ -1211,6 +1318,7 @@ test("base_unittests") {
"sha1_unittest.cc",
"stl_util_unittest.cc",
"strings/nullable_string16_unittest.cc",
+ "strings/pattern_unittest.cc",
"strings/safe_sprintf_unittest.cc",
"strings/string16_unittest.cc",
"strings/string_number_conversions_unittest.cc",
@@ -1308,9 +1416,6 @@ test("base_unittests") {
data = [
"test/data/",
-
- # TODO(dpranke): Remove when icu declares this directly.
- "$root_out_dir/icudtl.dat",
]
# Allow more direct string conversions on platforms with native utf8
@@ -1324,14 +1429,15 @@ test("base_unittests") {
":base_java",
":base_java_unittest_support",
]
+
+ # TODO(brettw) I think this should not be here, we should not be using
+ # isolate files.
isolate_file = "base_unittests.isolate"
}
if (is_ios) {
sources -= [
"process/memory_unittest.cc",
- "process/memory_unittest_mac.h",
- "process/memory_unittest_mac.mm",
"process/process_unittest.cc",
"process/process_util_unittest.cc",
]
@@ -1371,6 +1477,15 @@ test("base_unittests") {
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
+
+ # Symbols for crashes when running tests on swarming.
+ if (symbol_level > 0) {
+ if (is_win) {
+ data += [ "$root_out_dir/base_unittests.exe.pdb" ]
+ } else if (is_mac) {
+ data += [ "$root_out_dir/base_unittests.dSYM/" ]
+ }
+ }
}
if (is_android) {
« no previous file with comments | « apps/benchmark/event_unittest.cc ('k') | base/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698