--- cargo-crates/v8-0.93.1/build/config/compiler/BUILD.gn.orig 1973-11-29 22:33:09 UTC +++ cargo-crates/v8-0.93.1/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.