aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-build_config_BUILDCONFIG.gn
blob: 99df07ddaf94ae0ab8c7c3b909595de3ec7150d1 (plain) (blame)
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
--- build/config/BUILDCONFIG.gn.orig	2017-08-03 00:05:04.000000000 +0200
+++ build/config/BUILDCONFIG.gn	2017-08-09 23:42:27.032065000 +0200
@@ -131,13 +131,13 @@
   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. Typically this is used
   # to configure warnings.
   is_clang =
       current_os == "mac" || current_os == "ios" || current_os == "chromeos" ||
-      current_os == "fuchsia" ||
+      current_os == "fuchsia" || current_os == "bsd" ||
       (current_os == "linux" && current_cpu != "s390x" &&
        current_cpu != "s390" && current_cpu != "ppc64" && current_cpu != "ppc")
 
@@ -189,8 +189,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
@@ -228,7 +228,7 @@
   } else {
     _default_toolchain = "//build/toolchain/android:android_$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"
@@ -378,8 +378,18 @@
   is_nacl = false
   is_posix = true
   is_win = false
+} else if (current_os == "bsd") {
+  is_android = false
+  is_chromeos = false
+  is_fuchsia = false
+  is_ios = false
+  is_linux = false
+  is_bsd = true
+  is_mac = false
+  is_nacl = false
+  is_posix = true
+  is_win = false
 }
-
 # =============================================================================
 # SOURCES FILTERS
 # =============================================================================
@@ -449,7 +459,7 @@
 if (!is_mac && !is_ios) {
   sources_assignment_filter += [ "*.mm" ]
 }
-if (!is_linux) {
+if (!is_linux && !is_bsd) {
   sources_assignment_filter += [
     "*_linux.h",
     "*_linux.cc",