# Set to true when compiling with the Clang compiler. Typically this is used
# to configure warnings.
- is_clang = false
+ is_clang = (os == "mac" || os == "ios" || os == "linux")
# Forces a 64-bit build on Windows. Does nothing on other platforms. Normally
# we build 32-bit on Windows regardless of the current host OS bit depth.
is_nacl = false
is_posix = true
is_win = false
- if (!is_clang) {
- is_clang = true # Always use clang on Mac.
- }
} else if (os == "android") {
is_android = true
is_chromeos = false
is_nacl = false
is_posix = true
is_win = false
- if (!is_gyp_xcode_generator) {
- # Always use clang on iOS when using ninja
- is_clang = true
- }
} else if (os == "linux") {
is_android = false
is_chromeos = false
"//build/config:feature_flags",
"//build/config/compiler:compiler",
+ "//build/config/compiler:compiler_arm_fpu",
"//build/config/compiler:chromium_code",
+ "//build/config/compiler:default_include_dirs",
"//build/config/compiler:default_warnings",
"//build/config/compiler:no_rtti",
"//build/config/compiler:runtime_library",
set_default_toolchain("//build/toolchain/win:32")
}
} else if (is_android) {
- host_toolchain = "//build/toolchain/linux:$build_cpu_arch"
+ # Use clang for the x86/64 Linux host builds.
+ if (build_cpu_arch == "x86" || build_cpu_arch == "x64") {
+ host_toolchain = "//build/toolchain/linux:clang_$build_cpu_arch"
+ } else {
+ host_toolchain = "//build/toolchain/linux:$build_cpu_arch"
+ }
set_default_toolchain("//build/toolchain/android:$cpu_arch")
} else if (is_linux) {
- host_toolchain = "//build/toolchain/linux:$build_cpu_arch"
- set_default_toolchain("//build/toolchain/linux:$cpu_arch")
+ if (is_clang) {
+ host_toolchain = "//build/toolchain/linux:clang_$build_cpu_arch"
+ set_default_toolchain("//build/toolchain/linux:clang_$cpu_arch")
+ } else {
+ host_toolchain = "//build/toolchain/linux:$build_cpu_arch"
+ set_default_toolchain("//build/toolchain/linux:$cpu_arch")
+ }
} else if (is_mac) {
host_toolchain = "//build/toolchain/mac:clang"
set_default_toolchain(host_toolchain)