summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authoreugenis@chromium.org <eugenis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-09 10:44:07 +0000
committereugenis@chromium.org <eugenis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-09 10:44:07 +0000
commit220ea593af400386fb65c45b1dbbaceb037c87a6 (patch)
tree95cf6757293a26338e8b3fd3d1b772a5e4e8af37 /build
parent110ffe567864f1aba102b7498527821b4c85ca7d (diff)
downloadchromium_src-220ea593af400386fb65c45b1dbbaceb037c87a6.zip
chromium_src-220ea593af400386fb65c45b1dbbaceb037c87a6.tar.gz
chromium_src-220ea593af400386fb65c45b1dbbaceb037c87a6.tar.bz2
GYP changes for Clang/Android build.
TEST=none BUG=137569 Review URL: https://chromiumcodereview.appspot.com/10827214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150779 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-xbuild/android/envsetup.sh5
-rw-r--r--build/common.gypi42
2 files changed, 39 insertions, 8 deletions
diff --git a/build/android/envsetup.sh b/build/android/envsetup.sh
index 6d453f1..82370cc 100755
--- a/build/android/envsetup.sh
+++ b/build/android/envsetup.sh
@@ -103,11 +103,6 @@ export AR_target=$(basename ${ANDROID_TOOLCHAIN}/*-ar)
# Performs a gyp_chromium run to convert gyp->Makefile for android code.
android_gyp() {
echo "GYP_GENERATORS set to '$GYP_GENERATORS'"
- if [[ $GYP_DEFINES =~ "clang=1" ]]; then
- echo -n "NOTE: You have \`clang=1' in \$GYP_DEFINES; "
- echo "did you mean to run \`android_clang_gyp'?"
- fi
-
"${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@"
}
diff --git a/build/common.gypi b/build/common.gypi
index 3f64fa9..cf7b92b 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': [