--- build/config/BUILDCONFIG.gn.orig 2018-12-12 22:56:02.000000000 +0100 +++ build/config/BUILDCONFIG.gn 2018-12-15 22:33:58.610110000 +0100 @@ -131,10 +131,10 @@ is_official_build = false # Whether we're a traditional desktop unix. - is_desktop_linux = current_os == "linux" + is_desktop_linux = current_os == "linux" || current_os == "bsd" # Set to true when compiling with the Clang compiler. - is_clang = current_os != "linux" || + is_clang = current_os != "linux" || current_os == "bsd" || (current_cpu != "s390x" && current_cpu != "s390" && current_cpu != "ppc64" && current_cpu != "ppc" && current_cpu != "mips" && current_cpu != "mips64") @@ -186,8 +186,8 @@ # 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 == "bsd") { + if (target_os != "linux" || target_os != "bsd") { # TODO(dpranke) - is_clang normally applies only to the target # build, and there is no way to indicate that you want to override # it for both the target build *and* the host build. Do we need to @@ -227,7 +227,7 @@ 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 == "bsd") { # See comments in build/toolchain/cros/BUILD.gn about board compiles. if (is_clang) { _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" @@ -301,6 +301,7 @@ is_nacl = false is_posix = false is_win = true + is_bsd = false } else if (current_os == "mac") { is_aix = false is_android = false @@ -312,6 +313,7 @@ is_nacl = false is_posix = true is_win = false + is_bsd = false } else if (current_os == "android") { is_aix = false is_android = true @@ -323,6 +325,7 @@ is_nacl = false is_posix = true is_win = false + is_bsd = false } else if (current_os == "chromeos") { is_aix = false is_android = false @@ -334,6 +337,7 @@ is_nacl = false is_posix = true is_win = false + is_bsd = false } else if (current_os == "nacl") { # current_os == "nacl" will be passed by the nacl toolchain definition. # It is not set by default or on the command line. We treat is as a @@ -348,6 +352,7 @@ is_nacl = true is_posix = true is_win = false + is_bsd = false } else if (current_os == "fuchsia") { is_aix = false is_android = false @@ -359,6 +364,7 @@ is_nacl = false is_posix = false is_win = false + is_bsd = false } else if (current_os == "ios") { is_aix = false is_android = false @@ -370,6 +376,7 @@ is_nacl = false is_posix = true is_win = false + is_bsd = false } else if (current_os == "linux") { is_aix = false is_android = false @@ -381,6 +388,7 @@ is_nacl = false is_posix = true is_win = false + is_bsd = false } else if (current_os == "aix") { is_aix = true is_android = false @@ -392,6 +400,19 @@ is_nacl = false is_posix = true is_win = false + is_bsd = false +} else if (current_os == "bsd") { + is_aix = false + is_android = false + is_chromeos = false + is_fuchsia = false + is_ios = false + is_linux = true + is_mac = false + is_nacl = false + is_posix = true + is_win = false + is_bsd = true } # =============================================================================