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
113
114
115
116
117
118
|
--- build/config/BUILDCONFIG.gn.orig 2018-08-01 00:08:26.000000000 +0200
+++ build/config/BUILDCONFIG.gn 2018-08-04 13:56:21.383564000 +0200
@@ -131,10 +131,10 @@
is_official_build = false
# Whether we're a traditional desktop unix.
- is_desktop_linux = current_os == "linux"
+ is_desktop_linux = current_os == "linux" || current_os == "bsd"
# Set to true when compiling with the Clang compiler.
- is_clang = current_os != "linux" ||
+ is_clang = current_os != "linux" || current_os == "bsd" ||
(current_cpu != "s390x" && current_cpu != "s390" &&
current_cpu != "ppc64" && current_cpu != "ppc" &&
current_cpu != "mips" && current_cpu != "mips64")
@@ -186,8 +186,8 @@
# TODO(dpranke): Add some sort of assert here that verifies that
# no toolchain omitted host_toolchain from its toolchain_args().
- if (host_os == "linux") {
- if (target_os != "linux") {
+ if (host_os == "linux" || host_os == "bsd") {
+ if (target_os != "linux" || target_os != "bsd") {
# TODO(dpranke) - is_clang normally applies only to the target
# build, and there is no way to indicate that you want to override
# it for both the target build *and* the host build. Do we need to
@@ -227,7 +227,7 @@
assert(host_os == "linux" || host_os == "mac",
"Android builds are only supported on Linux and Mac hosts.")
_default_toolchain = "//build/toolchain/android:android_clang_$target_cpu"
-} else if (target_os == "chromeos" || target_os == "linux") {
+} else if (target_os == "chromeos" || target_os == "linux" || target_os == "bsd") {
# See comments in build/toolchain/cros/BUILD.gn about board compiles.
if (is_clang) {
_default_toolchain = "//build/toolchain/linux:clang_$target_cpu"
@@ -300,6 +300,7 @@
is_nacl = false
is_posix = false
is_win = true
+ is_bsd = false
} else if (current_os == "mac") {
is_android = false
is_chromeos = false
@@ -310,6 +311,7 @@
is_nacl = false
is_posix = true
is_win = false
+ is_bsd = false
} else if (current_os == "android") {
is_android = true
is_chromeos = false
@@ -320,6 +322,7 @@
is_nacl = false
is_posix = true
is_win = false
+ is_bsd = false
} else if (current_os == "chromeos") {
is_android = false
is_chromeos = true
@@ -330,6 +333,7 @@
is_nacl = false
is_posix = true
is_win = false
+ is_bsd = false
} else if (current_os == "nacl") {
# current_os == "nacl" will be passed by the nacl toolchain definition.
# It is not set by default or on the command line. We treat is as a
@@ -343,6 +347,7 @@
is_nacl = true
is_posix = true
is_win = false
+ is_bsd = false
} else if (current_os == "fuchsia") {
is_android = false
is_chromeos = false
@@ -353,6 +358,7 @@
is_nacl = false
is_posix = false
is_win = false
+ is_bsd = false
} else if (current_os == "ios") {
is_android = false
is_chromeos = false
@@ -363,6 +369,7 @@
is_nacl = false
is_posix = true
is_win = false
+ is_bsd = false
} else if (current_os == "linux") {
is_android = false
is_chromeos = false
@@ -373,6 +380,7 @@
is_nacl = false
is_posix = true
is_win = false
+ is_bsd = false
} else if (current_os == "aix") {
is_android = false
is_chromeos = false
@@ -383,6 +391,18 @@
is_nacl = false
is_posix = true
is_win = false
+ is_bsd = false
+} else if (current_os == "bsd") {
+ is_android = false
+ is_chromeos = false
+ is_fuchsia = false
+ is_ios = false
+ is_linux = true
+ is_mac = false
+ is_nacl = false
+ is_posix = true
+ is_win = false
+ is_bsd = true
}
# =============================================================================
|