From: Michael Froman Date: Mon, 20 Jun 2022 22:34:00 +0000 Subject: Bug 1775143 - pt15 - (mirror) 0300b32b7de7 r=ng (skip-generation) Depends on D149828 Differential Revision: https://phabricator.services.mozilla.com/D149829 Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/831cdef4bf346cb9cc0092ab7e7beea0aa6677c3 --- config/BUILDCONFIG.gn | 7 ++++--- config/ui.gni | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/BUILDCONFIG.gn b/config/BUILDCONFIG.gn index 62e7e4bcd..4d7d4f103 100644 --- a/config/BUILDCONFIG.gn +++ b/config/BUILDCONFIG.gn @@ -131,7 +131,7 @@ declare_args() { is_official_build = false # Set to true when compiling with the Clang compiler. - is_clang = current_os != "linux" || + is_clang = current_os != "linux" || current_os == "openbsd" || (current_cpu != "s390x" && current_cpu != "s390" && current_cpu != "ppc64" && current_cpu != "ppc" && current_cpu != "mips" && current_cpu != "mips64" && @@ -184,7 +184,7 @@ 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 (host_os == "linux" || host_os == "openbsd") { if (target_os != "linux") { host_toolchain = "//build/toolchain/linux:clang_$host_cpu" } else if (is_clang) { @@ -222,7 +222,7 @@ if (target_os == "android") { assert(host_os == "linux" || host_os == "mac", "Android builds are only supported on Linux and Mac hosts.") _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 == "openbsd") { # See comments in build/toolchain/cros/BUILD.gn about board compiles. if (is_clang) { _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" @@ -288,6 +288,7 @@ is_chromeos = current_os == "chromeos" is_fuchsia = current_os == "fuchsia" is_ios = current_os == "ios" is_linux = current_os == "linux" +is_bsd = current_os == "openbsd" is_mac = current_os == "mac" is_nacl = current_os == "nacl" is_win = current_os == "win" || current_os == "winuwp" diff --git a/config/ui.gni b/config/ui.gni index 55478b02c..d63ce5118 100644 --- a/config/ui.gni +++ b/config/ui.gni @@ -35,7 +35,7 @@ declare_args() { use_glib = is_linux && !is_chromecast } -assert(!use_glib || (is_linux && !is_chromecast)) +assert(!use_glib || ((is_linux || is_bsd) && !is_chromecast)) use_atk = is_linux && !is_chromecast && use_glib && current_toolchain == default_toolchain