Update lang/v8 to version 9.9.115.10
[dports.git] / lang / v8 / files / patch-build_config_compiler_BUILD.gn
1 --- build/config/compiler/BUILD.gn.orig 2022-01-23 11:59:03 UTC
2 +++ build/config/compiler/BUILD.gn
3 @@ -140,7 +140,7 @@ declare_args() {
4    #
5    # TODO(crbug.com/1131993): Enabling this when 'is_android' is true breaks
6    # content_shell_test_apk on both ARM and x86.
7 -  init_stack_vars = !is_android
8 +  init_stack_vars = !is_android && !is_bsd
9  
10    # This argument is to control whether enabling text section splitting in the
11    # final binary. When enabled, the separated text sections with prefix
12 @@ -357,7 +357,7 @@ config("compiler") {
13      }
14  
15      # Linker warnings.
16 -    if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
17 +    if (fatal_linker_warnings && !is_apple && !is_bsd && current_os != "aix" &&
18          current_os != "zos") {
19        ldflags += [ "-Wl,--fatal-warnings" ]
20      }
21 @@ -534,7 +534,7 @@ config("compiler") {
22      ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
23    }
24  
25 -  if (is_clang && !is_nacl && current_os != "zos") {
26 +  if (is_clang && !is_nacl && !is_bsd && current_os != "zos") {
27      cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
28  
29      # TODO(hans): Remove this once Clang generates better optimized debug info
30 @@ -917,7 +917,7 @@ config("compiler_cpu_abi") {
31          cflags += [ "-mtune=$arm_tune" ]
32        }
33      } else if (current_cpu == "arm64") {
34 -      if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
35 +      if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) {
36          cflags += [ "--target=aarch64-linux-gnu" ]
37          ldflags += [ "--target=aarch64-linux-gnu" ]
38        }
39 @@ -1238,7 +1238,7 @@ config("compiler_deterministic") {
40      # different build directory like "out/feature_a" and "out/feature_b" if
41      # we build same files with same compile flag.
42      # Other paths are already given in relative, no need to normalize them.
43 -    if (is_nacl) {
44 +    if (is_nacl || is_bsd) {
45        # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
46        cflags += [
47          "-Xclang",
48 @@ -1251,7 +1251,7 @@ config("compiler_deterministic") {
49        # and -fcoverage-compilation-dir=.
50        cflags += [ "-ffile-compilation-dir=." ]
51      }
52 -    if (!is_win) {
53 +    if (!is_win && !is_bsd) {
54        # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
55        asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
56      }
57 @@ -1502,7 +1502,7 @@ config("default_warnings") {
58        "-Wno-unneeded-internal-declaration",
59      ]
60  
61 -    if (!is_nacl || is_nacl_saigo) {
62 +    if ((!is_nacl || is_nacl_saigo) && !is_bsd) {
63        if (is_win) {
64          # TODO(thakis): https://crbug.com/617318
65          # Currently goma can not handle case sensitiveness for windows well.
66 @@ -1791,7 +1791,7 @@ config("thin_archive") {
67    # archives.
68    # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
69    # confuses lldb.
70 -  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
71 +  if ((is_posix && !is_nacl && !is_apple && !is_bsd) || is_fuchsia) {
72      arflags = [ "-T" ]
73    } else if (is_win && use_lld) {
74      arflags = [ "/llvmlibthin" ]
75 @@ -2289,7 +2289,7 @@ config("symbols") {
76      # flag, so we can use use -g1 for pnacl and nacl-clang compiles.
77      # gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang.
78      if ((!is_nacl || is_clang) && current_os != "zos") {
79 -      cflags += [ "-g2" ]
80 +      cflags += [ "-g0" ]
81      }
82  
83      if (!is_nacl && is_clang && !is_tsan && !is_asan &&
84 @@ -2329,7 +2329,7 @@ config("symbols") {
85      # sections" there.  Maybe just a bug in nacl_switch_32.S.
86      _enable_gdb_index =
87          symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" &&
88 -        current_os != "zos" && (use_gold || use_lld) &&
89 +        current_os != "zos" && (use_gold || use_lld) && !is_bsd &&
90          # Disable on non-fission 32-bit Android because it pushes
91          # libcomponents_unittests over the 4gb size limit.
92          !(is_android && !use_debug_fission && current_cpu != "x64" &&
93 @@ -2347,7 +2347,7 @@ config("symbols") {
94    }
95  
96    if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") {
97 -    if (is_apple) {
98 +    if (is_apple || is_bsd) {
99        # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
100        # Make sure we don't use constructor homing on mac.
101        cflags += [