summaryrefslogtreecommitdiff
path: root/devel/electron37/files/patch-build_config_BUILDCONFIG.gn
blob: afae78b0fd26549e15dc6e14b468263d0993d2af (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
--- build/config/BUILDCONFIG.gn.orig	2025-07-04 05:17:06 UTC
+++ build/config/BUILDCONFIG.gn
@@ -139,7 +139,8 @@ declare_args() {
   is_official_build = false
 
   # Set to true when compiling with the Clang compiler.
-  is_clang = current_os != "linux" ||
+  is_clang = current_os != "linux" || current_os == "openbsd" ||
+             current_os == "freebsd" ||
              (current_cpu != "s390x" && current_cpu != "s390" &&
               current_cpu != "ppc64" && current_cpu != "ppc" &&
               current_cpu != "mips" && current_cpu != "mips64" &&
@@ -238,6 +239,10 @@ if (host_toolchain == "") {
     host_toolchain = "//build/toolchain/aix:$host_cpu"
   } else if (host_os == "zos") {
     host_toolchain = "//build/toolchain/zos:$host_cpu"
+  } else if (host_os == "openbsd") {
+    host_toolchain = "//build/toolchain/openbsd:clang_$host_cpu"
+  } else if (host_os == "freebsd") {
+    host_toolchain = "//build/toolchain/freebsd:clang_$host_cpu"
   } else {
     assert(false, "Unsupported host_os: $host_os")
   }
@@ -287,6 +292,8 @@ if (target_os == "android") {
   assert(
       false,
       "emscripten is not a supported target_os. It is available only as secondary toolchain.")
+} else if (target_os == "openbsd" || target_os == "freebsd") {
+  _default_toolchain = host_toolchain
 } else {
   assert(false, "Unsupported target_os: $target_os")
 }
@@ -321,7 +328,11 @@ is_ios = current_os == "ios"
 is_chromeos = current_os == "chromeos"
 is_fuchsia = current_os == "fuchsia"
 is_ios = current_os == "ios"
-is_linux = current_os == "linux"
+is_linux = current_os == "linux" || current_os == "openbsd" ||
+           current_os == "freebsd"
+is_openbsd = current_os == "openbsd"
+is_freebsd = current_os == "freebsd"
+is_bsd = current_os == "openbsd" || current_os == "freebsd"
 is_mac = current_os == "mac"
 is_nacl = current_os == "nacl"
 is_wasm = current_os == "emscripten"