aboutsummaryrefslogtreecommitdiff
path: root/www/deno/files/patch-cargo-crates_v8_build_config_compiler_BUILD.gn
blob: 524ba122add75336fe5ad6e5ef6cd9a84d24d221 (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
--- cargo-crates/v8-0.44.2/build/config/compiler/BUILD.gn.orig	1973-11-29 22:33:09.000000000 +0100
+++ cargo-crates/v8-0.44.2/build/config/compiler/BUILD.gn	2022-05-31 15:40:38.996239000 +0200
@@ -137,7 +137,7 @@ declare_args() {
   #
   # TODO(crbug.com/1131993): Enabling this when 'is_android' is true breaks
   # content_shell_test_apk on both ARM and x86.
-  init_stack_vars = !is_android
+  init_stack_vars = !is_bsd && !is_android 
 
   # This argument is to control whether enabling text section splitting in the
   # final binary. When enabled, the separated text sections with prefix
@@ -245,7 +245,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",
@@ -366,7 +366,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" ]
     }
@@ -536,7 +536,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 ]
 
     # TODO(hans): Remove this once Clang generates better optimized debug info
@@ -931,7 +931,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) {
         cflags += [ "--target=aarch64-linux-gnu" ]
         ldflags += [ "--target=aarch64-linux-gnu" ]
       }
@@ -1263,9 +1263,9 @@ 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=." ]
     }
-    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,." ]
     }
@@ -1559,12 +1559,12 @@ config("default_warnings") {
         cflags += [ "-Wno-builtin-assume-aligned-alignment" ]
       }
 
-      if (!is_nacl && clang_major_version >= 15) {
+      if (!is_nacl && !is_bsd && clang_major_version >= 15) {
         # TODO(https://crbug.com/1300731) Clean up and enable.
         cflags += [ "-Wno-unqualified-std-cast-call" ]
       }
 
-      if (!is_nacl && !(is_chromeos ||
+      if (!is_bsd && !is_nacl && !(is_chromeos ||
                         default_toolchain == "//build/toolchain/cros:target") &&
           clang_major_version >= 15) {
         # TODO(https://crbug.com/1316298): Re-enable once test failure is figured out
@@ -1865,7 +1865,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" ]
@@ -2366,7 +2366,7 @@ config("symbols") {
     # flag, so we can use use -g1 for pnacl and nacl-clang compiles.
     # gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang.
     if ((!is_nacl || is_clang) && current_os != "zos") {
-      cflags += [ "-g2" ]
+      cflags += [ "-g0" ]
     }
 
     if (!is_nacl && is_clang && !is_tsan && !is_asan &&
@@ -2405,7 +2405,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.