aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-12-10 17:26:02 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2014-12-10 20:57:06 +0800
commit66c25326ae7cec8f3ab3f2fec8c3164ded3bd28c (patch)
tree197754cbfc37eb07d591a15cbd27b9d8b1364700 /build
parent4a93ce816ac39e769d245bbc9b89f0839dba3c6a (diff)
downloadndk-66c25326ae7cec8f3ab3f2fec8c3164ded3bd28c.tar.gz
Disable clang integrated-as for STL
Turn off integrated-as by default for clang >= 3.5 due to ill-formed object it produces involving inline-assembly .pushsection/.popsection which crashes ld.gold Unless clang3.5 or above is used to compile compiler-rt BUG=18589643 Change-Id: I1fb62337dbbb11b458c633821bb615babddce26e
Diffstat (limited to 'build')
-rwxr-xr-xbuild/tools/build-compiler-rt.sh5
-rw-r--r--build/tools/builder-funcs.sh6
2 files changed, 11 insertions, 0 deletions
diff --git a/build/tools/build-compiler-rt.sh b/build/tools/build-compiler-rt.sh
index 27eeceb32..4a81d31b1 100755
--- a/build/tools/build-compiler-rt.sh
+++ b/build/tools/build-compiler-rt.sh
@@ -225,6 +225,11 @@ build_compiler_rt_libs_for_abi ()
else
ARCH=$(convert_abi_to_arch $ABI)
GCCVER=$(get_default_gcc_version_for_arch $ARCH)
+ if [ "$LLVM_VERSION" \> "3.4" ]; then
+ # Turn on integrated-as for clang >= 3.5 otherwise file like
+ # can't be compiled
+ COMPILER_RT_CFLAGS="$COMPILER_RT_CFLAGS -fintegrated-as"
+ fi
fi
builder_begin_android $ABI "$BUILDDIR" "$GCCVER" "$LLVM_VERSION" "$MAKEFILE" "android-$FIRST_API64_LEVEL"
diff --git a/build/tools/builder-funcs.sh b/build/tools/builder-funcs.sh
index 15f711ba4..907f91796 100644
--- a/build/tools/builder-funcs.sh
+++ b/build/tools/builder-funcs.sh
@@ -615,6 +615,12 @@ builder_begin_android ()
;;
esac
SCRATCH_FLAGS="-target $LLVM_TRIPLE $FLAGS"
+ if [ "$LLVM_VERSION" \> "3.4" ]; then
+ # Turn off integrated-as for clang >= 3.5 due to ill-formed object it produces
+ # involving inline-assembly .pushsection/.popsection which crashes ld.gold
+ # BUG=18589643
+ SCRATCH_FLAGS="$SCRATCH_FLAGS -fno-integrated-as"
+ fi
builder_cflags "$SCRATCH_FLAGS"
builder_cxxflags "$SCRATCH_FLAGS"
builder_ldflags "$SCRATCH_FLAGS"