Index: head/www/deno/files/patch-cargo-crates_rusty__v8_build_config_compiler_BUILD.gn =================================================================== --- head/www/deno/files/patch-cargo-crates_rusty__v8_build_config_compiler_BUILD.gn (revision 563086) +++ head/www/deno/files/patch-cargo-crates_rusty__v8_build_config_compiler_BUILD.gn (revision 563087) @@ -1,101 +1,92 @@ ---- cargo-crates/rusty_v8-0.16.0/build/config/compiler/BUILD.gn.orig 2021-01-19 00:12:27 UTC +--- cargo-crates/rusty_v8-0.16.0/build/config/compiler/BUILD.gn.orig 2021-01-19 00:12:27 UTC +++ cargo-crates/rusty_v8-0.16.0/build/config/compiler/BUILD.gn @@ -129,7 +129,7 @@ declare_args() { # # TODO(crbug.com/977230): Enabling this when 'use_xcode_clang' is true may # call an old clang that doesn't support auto-init. - init_stack_vars = !is_android && !use_xcode_clang + init_stack_vars = !is_bsd && !is_android && !use_xcode_clang # This argument is to control whether enabling text section splitting in the # final binary. When enabled, the separated text sections with prefix @@ -300,7 +300,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") { ldflags += [ "-Wl,--fatal-warnings" ] } if (fatal_linker_warnings && is_apple) { @@ -396,7 +396,7 @@ config("compiler") { # Compiler instrumentation can introduce dependencies in DSOs to symbols in # the executable they are loaded into, so they are unresolved at link-time. - if (!using_sanitizer) { + if (!using_sanitizer && !is_bsd) { ldflags += [ "-Wl,-z,defs", "-Wl,--as-needed", -@@ -406,7 +406,7 @@ config("compiler") { - - # Linux-specific compiler flags setup. - # ------------------------------------ -- if ((is_posix || is_fuchsia) && use_lld) { -+ if ((is_posix || is_fuchsia) && use_lld && !is_bsd) { - ldflags += [ "-fuse-ld=lld" ] - if (current_cpu == "arm64") { - # Reduce the page size from 65536 in order to reduce binary size slightly @@ -487,7 +487,7 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } - if (is_clang && !is_nacl && !use_xcode_clang) { + if (is_clang && !is_nacl && !use_xcode_clang && !is_bsd) { cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] cflags += [ @@ -786,7 +786,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_android && !is_nacl && !is_fuchsia && !is_bsd) { cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] } @@ -1136,7 +1136,7 @@ config("compiler_deterministic") { "-Xclang", ".", ] - 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,." ] } @@ -1519,7 +1519,7 @@ config("default_warnings") { cflags += [ "-Wno-nonportable-include-path" ] } - if (current_toolchain == host_toolchain || !use_xcode_clang) { + if ((current_toolchain == host_toolchain || !use_xcode_clang) && !is_bsd) { # Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not # recognize. cflags += [ @@ -1772,7 +1772,7 @@ config("thin_archive") { # Mac and iOS use the mac-specific "libtool" command, not ar, which doesn't # have a "thin archive" mode (it does accept -T, but it means truncating # archive names to 16 characters, which is not what we want). - 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" ] @@ -2326,7 +2326,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) { - cflags += [ "-g2" ] + cflags += [ "-g0" ] } # TODO(https://crbug.com/1050118): Investigate missing debug info on mac. @@ -2358,7 +2358,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. if (!is_apple && !is_nacl && current_cpu != "x86" && - (use_gold || use_lld)) { + (use_gold || use_lld) && !is_bsd) { if (is_clang) { # This flag enables the GNU-format pubnames and pubtypes sections, # which lld needs in order to generate a correct GDB index.