--- build/config/BUILDCONFIG.gn.orig 2026-09-01 03:36:21 UTC +++ build/config/BUILDCONFIG.gn @@ -224,8 +224,8 @@ if (host_toolchain == "") { # TODO(dpranke): Add some sort of assert here that verifies that # no toolchain omitted host_toolchain from its toolchain_args(). - if (host_os == "linux") { - if (target_os != "linux") { + if (host_os == "linux" || host_os == "freebsd") { + if (target_os != "linux" && target_os != "freebsd") { host_toolchain = "//build/toolchain/linux:clang_$host_cpu" } else if (is_clang) { host_toolchain = "//build/toolchain/linux:clang_$host_cpu" @@ -264,7 +264,7 @@ if (target_os == "android") { # Targeting android on Mac is best-effort and not guaranteed to work. assert(host_os == "linux", "Android builds are only supported on Linux.") _default_toolchain = "//build/toolchain/android:android_clang_$target_cpu" -} else if (target_os == "chromeos" || target_os == "linux") { +} else if (target_os == "chromeos" || target_os == "linux" || target_os == "freebsd") { # See comments in build/toolchain/cros/BUILD.gn about board compiles. if (is_clang) { _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" @@ -337,11 +337,12 @@ is_ios = current_os == "ios" is_chromeos = current_os == "chromeos" is_fuchsia = current_os == "fuchsia" is_ios = current_os == "ios" -is_linux = current_os == "linux" +is_linux = current_os == "linux" || current_os == "freebsd" is_mac = current_os == "mac" is_wasm = current_os == "emscripten" is_watchos = current_os == "watchos" is_win = current_os == "win" || current_os == "winuwp" +is_bsd = current_os == "freebsd" is_apple = is_ios || is_mac || is_watchos is_posix = !is_win && !is_fuchsia @@ -625,6 +626,8 @@ foreach(_target_type, filter_include([ _current_label ], STRICT_DEPS_EXCLUDE) == [] || filter_include([ _current_label ], STRICT_DEPS_INCLUDE) != [] } + # devel/gn predates check_includes_strict (added in gn 2489) + not_needed([ "check_includes_strict" ]) if (use_libcxx_modules && is_clang) { if (strict_deps) { @@ -637,6 +640,7 @@ foreach(_target_type, if (!defined(generate_modulemap)) { generate_modulemap = default_modulemap_mode } + not_needed([ "generate_modulemap" ]) if (use_libcxx_modules) { # Add a dependency needed for Clang modules builds. @@ -768,6 +772,8 @@ foreach(_target_type, filter_include([ _current_label ], STRICT_DEPS_EXCLUDE) == [] || filter_include([ _current_label ], STRICT_DEPS_INCLUDE) != [] } + # devel/gn predates check_includes_strict (added in gn 2489) + not_needed([ "check_includes_strict" ]) if (use_libcxx_modules && is_clang) { if (strict_deps) { @@ -780,6 +786,7 @@ foreach(_target_type, if (!defined(generate_modulemap)) { generate_modulemap = default_modulemap_mode } + not_needed([ "generate_modulemap" ]) if (use_libcxx_modules) { # Add a dependency needed for Clang modules builds.