--- cargo-crates/v8-0.40.2/build/toolchain/gcc_toolchain.gni.orig 1970-01-01 01:00:00.000000000 +0100 +++ cargo-crates/v8-0.40.2/build/toolchain/gcc_toolchain.gni 2021-07-13 19:32:27.892587000 +0200 @@ -51,6 +51,11 @@ if (enable_resource_allowlist_generation) { "enable_resource_allowlist_generation=true does not work for target_os=$target_os") } +declare_args() { + extra_cxxflags = "" + extra_ldflags = "" +} + # This template defines a toolchain for something that works like gcc # (including clang). # @@ -654,13 +659,23 @@ template("clang_toolchain") { } gcc_toolchain(target_name) { - prefix = rebase_path("$clang_base_path/bin", root_build_dir) - cc = "$prefix/clang" - cxx = "$prefix/clang++" - ld = cxx - readelf = "${toolprefix}readelf" - ar = "${prefix}/llvm-ar" - nm = "${prefix}/llvm-nm" + if (is_bsd) { + prefix = "%%LOCALBASE%%/bin" + cc = "cc" + cxx = "c++" + ld = cxx + readelf = "readelf" + ar = "${prefix}/ar" + nm = "${toolprefix}nm" + } else { + prefix = rebase_path("$clang_base_path/bin", root_build_dir) + cc = "$prefix/clang" + cxx = "$prefix/clang++" + ld = cxx + readelf = "${toolprefix}readelf" + ar = "${prefix}/llvm-ar" + nm = "${toolprefix}nm" + } forward_variables_from(invoker, [