Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: build/config/BUILDCONFIG.gn

Issue 385823002: Make it possible for Android GN host builds to use Clang. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « breakpad/BUILD.gn ('k') | build/toolchain/gcc_toolchain.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/BUILDCONFIG.gn
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 3df338da72ce1c816e0d595209a8a729648dbb96..4e24a360ee0bd7eb652e0a7ef87749c4caef8bd7 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -31,7 +31,7 @@ declare_args() {
# 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")
Nico 2014/07/10 23:06:49 The idea here is to add `os == "linux"` here one t
# 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.
@@ -101,9 +101,6 @@ if (os == "win") {
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
@@ -142,10 +139,6 @@ if (os == "win") {
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
@@ -459,11 +452,22 @@ if (is_win) {
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.
+ # (Disabled until the Clang build works properly.)
+ #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)
« no previous file with comments | « breakpad/BUILD.gn ('k') | build/toolchain/gcc_toolchain.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698