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
|
--- base/BUILD.gn.orig 2017-06-05 21:03:00.000000000 +0200
+++ base/BUILD.gn 2017-06-13 19:23:34.211227000 +0200
@@ -1098,7 +1098,7 @@
"base_paths_win.h",
]
- if (is_linux) {
+ if (is_linux || is_bsd) {
sources += [ "base_paths_posix.cc" ]
}
}
@@ -1157,6 +1157,9 @@
deps += [ "//base/allocator:tcmalloc" ]
} else if (is_linux && use_allocator == "none") {
sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ]
+ } else if (is_bsd && use_allocator == "none") {
+ # TODO move the code to "allocator_shim_default_dispatch_to_glibc.cc"
+ sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ]
} else if (is_android && use_allocator == "none") {
sources += [
"allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc",
@@ -1172,6 +1175,33 @@
}
}
+ if (is_bsd) {
+ sources -= [
+ "files/file_util_linux.cc",
+ "files/file_path_watcher_linux.cc",
+ "process/process_linux.cc",
+ "process/process_iterator_linux.cc",
+ "process/process_metrics_linux.cc",
+ "process/process_handle_linux.cc",
+ "sys_info_linux.cc",
+ "trace_event/malloc_dump_provider.cc",
+ "trace_event/malloc_dump_provider.h",
+ ]
+ sources += [
+ "files/file_path_watcher_stub.cc",
+ "process/process_handle_freebsd.cc",
+ "process/process_iterator_freebsd.cc",
+ "process/process_metrics_freebsd.cc",
+ "sys_info_freebsd.cc",
+ ]
+ libs = [
+ "execinfo", # logging.cc
+ "kvm" # process_metrics_freebsd
+ ]
+ }
+
+
+
# Allow more direct string conversions on platforms with native utf8
# strings
if (is_mac || is_ios || is_chromeos || is_chromecast) {
@@ -1469,7 +1499,7 @@
}
# Linux.
- if (is_linux) {
+ if (is_linux || is_bsd) {
if (is_asan || is_lsan || is_msan || is_tsan) {
# For llvm-sanitizer.
data += [ "//third_party/llvm-build/Release+Asserts/lib/libstdc++.so.6" ]
@@ -1494,7 +1524,7 @@
"//base/third_party/xdg_user_dirs",
]
} else {
- # Non-Linux.
+ # Non-Linux/BSD.
sources -= [
"nix/mime_util_xdg.cc",
"nix/mime_util_xdg.h",
@@ -2325,6 +2355,12 @@
"trace_event/trace_event_android_unittest.cc",
]
set_sources_assignment_filter(sources_assignment_filter)
+ }
+
+ if (is_bsd) {
+ sources -= [
+ "debug/proc_maps_linux_unittest.cc",
+ ]
}
if (is_win) {
|