summaryrefslogtreecommitdiff
path: root/devel/electron4/files/patch-build_config_BUILDCONFIG.gn
blob: 2dd8598ea826726b7e1523b3b71ccf3fc02b420a (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
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
119
--- build/config/BUILDCONFIG.gn.orig	2019-03-16 09:15:20 UTC
+++ build/config/BUILDCONFIG.gn
@@ -134,10 +134,10 @@ declare_args() {
   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 == "freebsd"
 
   # Set to true when compiling with the Clang compiler.
-  is_clang = current_os != "linux" ||
+  is_clang = current_os != "linux" || current_os == "freebsd" ||
              (current_cpu != "s390x" && current_cpu != "s390" &&
               current_cpu != "ppc64" && current_cpu != "ppc" &&
               current_cpu != "mips" && current_cpu != "mips64")
@@ -189,8 +189,8 @@ if (host_toolchain == "") {
   # 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 == "freebsd") {
+    if (target_os != "linux" || target_os != "freebsd") {
       # 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
@@ -230,7 +230,7 @@ if (target_os == "android") {
   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 == "freebsd") {
   # See comments in build/toolchain/cros/BUILD.gn about board compiles.
   if (is_clang) {
     _default_toolchain = "//build/toolchain/linux:clang_$target_cpu"
@@ -304,6 +304,7 @@ if (current_os == "win" || current_os == "winuwp") {
   is_nacl = false
   is_posix = false
   is_win = true
+  is_bsd = false
 } else if (current_os == "mac") {
   is_aix = false
   is_android = false
@@ -315,6 +316,7 @@ if (current_os == "win" || current_os == "winuwp") {
   is_nacl = false
   is_posix = true
   is_win = false
+  is_bsd = false
 } else if (current_os == "android") {
   is_aix = false
   is_android = true
@@ -326,6 +328,7 @@ if (current_os == "win" || current_os == "winuwp") {
   is_nacl = false
   is_posix = true
   is_win = false
+  is_bsd = false
 } else if (current_os == "chromeos") {
   is_aix = false
   is_android = false
@@ -337,6 +340,7 @@ if (current_os == "win" || current_os == "winuwp") {
   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
@@ -351,6 +355,7 @@ if (current_os == "win" || current_os == "winuwp") {
   is_nacl = true
   is_posix = true
   is_win = false
+  is_bsd = false
 } else if (current_os == "fuchsia") {
   is_aix = false
   is_android = false
@@ -362,6 +367,7 @@ if (current_os == "win" || current_os == "winuwp") {
   is_nacl = false
   is_posix = false
   is_win = false
+  is_bsd = false
 } else if (current_os == "ios") {
   is_aix = false
   is_android = false
@@ -373,6 +379,7 @@ if (current_os == "win" || current_os == "winuwp") {
   is_nacl = false
   is_posix = true
   is_win = false
+  is_bsd = false
 } else if (current_os == "linux") {
   is_aix = false
   is_android = false
@@ -384,6 +391,7 @@ if (current_os == "win" || current_os == "winuwp") {
   is_nacl = false
   is_posix = true
   is_win = false
+  is_bsd = false
 } else if (current_os == "aix") {
   is_aix = true
   is_android = false
@@ -395,6 +403,19 @@ if (current_os == "win" || current_os == "winuwp") {
   is_nacl = false
   is_posix = true
   is_win = false
+  is_bsd = false
+} else if (current_os == "freebsd") {
+  is_aix = false
+  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
 }
 
 # =============================================================================