aboutsummaryrefslogtreecommitdiff
path: root/www/deno/files/patch-cargo-crates_v8_build_config_compiler_BUILD.gn
blob: 866a40f5c088db078ca668bce81909e82430a285 (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
--- cargo-crates/v8-0.73.0/build/config/compiler/BUILD.gn.orig	1973-11-29 22:33:09 UTC
+++ cargo-crates/v8-0.73.0/build/config/compiler/BUILD.gn
@@ -135,7 +135,7 @@ declare_args() {
   #
   # TODO(crbug.com/1131993): This regresses binary size by ~1MB on Android and
   # needs to be evaluated before enabling it there as well.
-  init_stack_vars = !(is_android && is_official_build)
+  init_stack_vars = !is_bsd && !(is_android && is_official_build)
 
   # Zero init has favorable performance/size tradeoffs for Chrome OS
   # but was not evaluated for other platforms.
@@ -251,7 +251,7 @@ config("no_unresolved_symbols") {
 # Compiler instrumentation can introduce dependencies in DSOs to symbols in
 # the executable they are loaded into, so they are unresolved at link-time.
 config("no_unresolved_symbols") {
-  if (!using_sanitizer &&
+  if (!using_sanitizer && !is_bsd &&
       (is_linux || is_chromeos || is_android || is_fuchsia)) {
     ldflags = [
       "-Wl,-z,defs",
@@ -369,7 +369,7 @@ config("compiler") {
     }
 
     # Linker warnings.
-    if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
+    if (fatal_linker_warnings && !is_bsd && !is_apple && current_os != "aix" &&
         current_os != "zos") {
       ldflags += [ "-Wl,--fatal-warnings" ]
     }
@@ -556,7 +556,7 @@ config("compiler") {
     ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
   }
 
-  if (is_clang && !is_nacl && current_os != "zos") {
+  if (is_clang && !is_bsd && !is_nacl && current_os != "zos") {
     cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
     if (save_reproducers_on_lld_crash && use_lld) {
       ldflags += [
@@ -835,7 +835,7 @@ config("compiler") {
   # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode
   #   lldb doesn't have the needed changes yet.
   # TODO(crbug.com/1379070): Remove if the upstream default ever changes.
-  if (is_clang && !is_nacl && !is_win && !is_apple) {
+  if (is_clang && !is_nacl && !is_win && !is_apple && !is_bsd) {
     cflags_cc += [ "-gsimple-template-names" ]
   }
 
@@ -1030,7 +1030,7 @@ config("compiler_cpu_abi") {
         cflags += [ "-mtune=$arm_tune" ]
       }
     } else if (current_cpu == "arm64") {
-      if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+      if (is_clang && !is_bsd && !is_android && !is_nacl && !is_fuchsia &&
           !(is_chromeos_lacros && is_chromeos_device)) {
         cflags += [ "--target=aarch64-linux-gnu" ]
         ldflags += [ "--target=aarch64-linux-gnu" ]
@@ -1380,10 +1380,10 @@ config("compiler_deterministic") {
     } else {
       # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
       # and -fcoverage-compilation-dir=.
-      cflags += [ "-ffile-compilation-dir=." ]
+#      cflags += [ "-ffile-compilation-dir=." ]
       swiftflags += [ "-file-compilation-dir=." ]
     }
-    if (!is_win) {
+    if (!is_win && !is_bsd) {
       # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
       asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
     }
@@ -1953,7 +1953,7 @@ config("thin_archive") {
   # archives.
   # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
   # confuses lldb.
-  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
+  if ((is_posix && !is_bsd && !is_nacl && !is_apple) || is_fuchsia) {
     arflags = [ "-T" ]
   } else if (is_win && use_lld) {
     arflags = [ "/llvmlibthin" ]
@@ -2526,7 +2526,7 @@ config("symbols") {
     # DWARF info may be corrupt; offsets in a range list entry are in different
     # sections" there.  Maybe just a bug in nacl_switch_32.S.
     _enable_gdb_index =
-        symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" &&
+        symbol_level == 2 && !is_apple && !is_bsd && !is_nacl && current_cpu != "x86" &&
         current_os != "zos" && (use_gold || use_lld) &&
         # Disable on non-fission 32-bit Android because it pushes
         # libcomponents_unittests over the 4gb size limit.