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

Unified Diff: build/common.gypi

Issue 10827214: GYP changes for Clang/Android build. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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 | « build/android/envsetup.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 3f64fa96e10e8cb83e6fac866efed49dcd81935c..cf7b92b767eb957aac1031cc96512c698deb1f05 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -2222,7 +2222,7 @@
'cflags': [ '-mfpu=neon', ],
}, {
'cflags': [ '-mfpu=<(arm_fpu)', ],
- }]
+ }],
],
}],
['OS=="android"', {
@@ -2267,6 +2267,15 @@
'__ARM_ARCH_5TE__',
],
}],
+ ['clang==1', {
+ 'cflags!': [
+ # Clang does not support the following options.
+ '-mthumb-interwork',
+ '-finline-limit=64',
+ '-fno-tree-sra',
+ '-Wno-psabi',
+ ],
+ }],
],
}],
],
@@ -2583,6 +2592,33 @@
['android_upstream_bringup==1', {
'defines': ['ANDROID_UPSTREAM_BRINGUP=1',],
}],
+ ['clang==1', {
+ 'cflags': [
+ # Work around incompatibilities between bionic and clang
+ # headers.
+ '-D__compiler_offsetof=__builtin_offsetof',
+ '-Dnan=__builtin_nan',
+ ],
+ 'conditions': [
+ ['target_arch=="arm"', {
+ 'cflags': [
+ '-target arm-linux-androideabi',
+ '-mllvm -arm-enable-ehabi',
+ ],
+ 'ldflags': [
+ '-target arm-linux-androideabi',
+ ],
+ }],
+ ['target_arch=="ia32"', {
+ 'cflags': [
+ '-target x86-linux-androideabi',
+ ],
+ 'ldflags': [
+ '-target x86-linux-androideabi',
+ ],
+ }],
+ ],
+ }],
['android_build_type==0', {
'defines': [
# The NDK has these things, but doesn't define the constants
@@ -3284,7 +3320,7 @@
],
},
}],
- ['clang==1 and OS!="android"', {
+ ['clang==1', {
'make_global_settings': [
['CC', '<(make_clang_dir)/bin/clang'],
['CXX', '<(make_clang_dir)/bin/clang++'],
@@ -3294,7 +3330,7 @@
['LINK.host', '$(LINK)'],
],
}],
- ['OS=="android" and "<(GENERATOR)"!="ninja"', {
+ ['OS=="android" and clang==0 and "<(GENERATOR)"!="ninja"', {
# Hardcode the compiler names in the Makefile so that
# it won't depend on the environment at make time.
'make_global_settings': [
« no previous file with comments | « build/android/envsetup.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698