1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
--- base/BUILD.gn.orig 2020-11-13 06:36:34 UTC
+++ base/BUILD.gn
@@ -53,7 +53,7 @@ declare_args() {
# replacement base::Location::Current(). On by default in non-official builds
# for testing purposes.
# TODO(https://crbug.com/974061): remove this eventually.
- from_here_uses_location_builtins = !is_official_build
+ from_here_uses_location_builtins = !is_official_build && !is_bsd
# Unsafe developer build. Has developer-friendly features that may weaken or
# disable security measures like sandboxing or ASLR.
@@ -878,7 +878,7 @@ component("base") {
"timer/hi_res_timer_manager_posix.cc",
]
- if (!is_nacl && !is_apple) {
+ if (!is_nacl && !is_apple && !is_bsd) {
sources += [
"cpu_affinity_posix.cc",
"cpu_affinity_posix.h",
@@ -889,6 +889,11 @@ component("base") {
"profiler/thread_delegate_posix.h",
]
}
+ if (is_bsd) {
+ sources += [
+ "profiler/stack_sampler_posix.cc",
+ ]
+ }
}
if (is_win) {
@@ -1295,7 +1300,7 @@ component("base") {
# building inside the cros_sdk environment - use host_toolchain as a
# more robust check for this.
if (!use_sysroot &&
- (is_android || ((is_linux || is_chromeos) && !is_chromecast)) &&
+ (is_android || ((is_linux || is_chromeos) && !is_chromecast) && !is_clang) &&
host_toolchain != "//build/toolchain/cros:host") {
libs += [ "atomic" ]
}
@@ -1342,7 +1347,7 @@ component("base") {
"allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc",
]
}
- if (is_chromeos || is_linux) {
+ if ((is_chromeos || is_linux) && !is_bsd) {
sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ]
}
if (is_win) {
@@ -1811,7 +1816,7 @@ component("base") {
]
}
- if (is_linux || is_chromeos || is_android) {
+ if ((is_linux || is_chromeos || is_android) && !is_bsd) {
sources += [
"allocator/partition_allocator/spinning_futex_linux.cc",
"allocator/partition_allocator/spinning_futex_linux.h",
@@ -1956,6 +1961,34 @@ component("base") {
}
}
+ if (is_bsd) {
+ sources -= [
+ "files/file_path_watcher_linux.cc",
+ "files/file_util_linux.cc",
+ "process/memory_linux.cc",
+ "process/process_handle_linux.cc",
+ "process/process_iterator_linux.cc",
+ "process/process_metrics_linux.cc",
+ "system/sys_info_linux.cc"
+ ]
+ sources += [
+ "files/file_path_watcher_kqueue.cc",
+ "files/file_path_watcher_kqueue.h",
+ "files/file_path_watcher_stub.cc",
+ "process/memory_stubs.cc",
+ "process/process_handle_freebsd.cc",
+ "process/process_iterator_freebsd.cc",
+ "process/process_metrics_freebsd.cc",
+ "system/sys_info_freebsd.cc",
+ ]
+ libs = [
+ "execinfo", # logging.cc
+ "kvm", # process_metrics_freebsd
+ "util" # process_metrics_freebsd
+ ]
+ }
+
+
# iOS
if (is_ios) {
sources -= [
@@ -3069,7 +3102,7 @@ test("base_unittests") {
]
}
- if (is_linux || is_chromeos) {
+ if ((is_linux || is_chromeos) && !is_bsd) {
sources += [ "debug/proc_maps_linux_unittest.cc" ]
}
@@ -3110,7 +3143,7 @@ test("base_unittests") {
"posix/unix_domain_socket_unittest.cc",
"task/thread_pool/task_tracker_posix_unittest.cc",
]
- if (!is_nacl && !is_apple) {
+ if (!is_nacl && !is_apple && !is_bsd) {
sources += [
"cpu_affinity_posix_unittest.cc",
"profiler/stack_copier_signal_unittest.cc",
|