diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-10-24 14:03:41 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-10-24 14:03:41 +0000 |
commit | a69eb9a1a0b111a4776a9bd727f4d551ec308261 (patch) | |
tree | d1a72e834ca1075497019574de824b4ba9465c7d /make | |
parent | ec3a5a21fd261f5227b5ad0d76bc148c6d227297 (diff) | |
download | compiler-rt-a69eb9a1a0b111a4776a9bd727f4d551ec308261.tar.gz compiler-rt-a69eb9a1a0b111a4776a9bd727f4d551ec308261.tar.bz2 compiler-rt-a69eb9a1a0b111a4776a9bd727f4d551ec308261.tar.xz |
Build ASan runtime for ARM/Android.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166559 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'make')
-rw-r--r-- | make/lib_info.mk | 2 | ||||
-rw-r--r-- | make/options.mk | 2 | ||||
-rw-r--r-- | make/platform/clang_darwin.mk | 2 | ||||
-rw-r--r-- | make/platform/clang_linux.mk | 17 |
4 files changed, 22 insertions, 1 deletions
diff --git a/make/lib_info.mk b/make/lib_info.mk index 81f96954..5e668160 100644 --- a/make/lib_info.mk +++ b/make/lib_info.mk @@ -56,4 +56,4 @@ AvailableOptions := AR ARFLAGS \ CC CFLAGS LDFLAGS FUNCTIONS OPTIMIZED \ RANLIB RANLIBFLAGS \ VISIBILITY_HIDDEN KERNEL_USE \ - SHARED_LIBRARY STRIP LIPO + SHARED_LIBRARY SHARED_LIBRARY_SUFFIX STRIP LIPO diff --git a/make/options.mk b/make/options.mk index d943e008..ec4a55df 100644 --- a/make/options.mk +++ b/make/options.mk @@ -43,3 +43,5 @@ RANLIBFLAGS := 2> /dev/null STRIP := strip LIPO := lipo + +SHARED_LIBRARY_SUFFIX := so diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk index db128cf7..5bc0e106 100644 --- a/make/platform/clang_darwin.mk +++ b/make/platform/clang_darwin.mk @@ -435,3 +435,5 @@ KERNEL_USE.cc_kext := 1 KERNEL_USE.cc_kext_ios5 := 1 VISIBILITY_HIDDEN := 1 + +SHARED_LIBRARY_SUFFIX := dylib diff --git a/make/platform/clang_linux.mk b/make/platform/clang_linux.mk index 770a551b..43661434 100644 --- a/make/platform/clang_linux.mk +++ b/make/platform/clang_linux.mk @@ -66,6 +66,11 @@ Arch.asan-x86_64 := x86_64 Arch.tsan-x86_64 := x86_64 endif +ifneq ($(LLVM_ANDROID_TOOLCHAIN_DIR),) +Configs += asan-arm-android +Arch.asan-arm-android := arm-android +endif + endif endif @@ -81,6 +86,14 @@ CFLAGS.asan-i386 := $(CFLAGS) -m32 -fPIE -fno-builtin CFLAGS.asan-x86_64 := $(CFLAGS) -m64 -fPIE -fno-builtin CFLAGS.tsan-x86_64 := $(CFLAGS) -m64 -fPIE -fno-builtin +SHARED_LIBRARY.asan-arm-android := 1 +ANDROID_COMMON_FLAGS := -target arm-linux-androideabi \ + --sysroot=$(LLVM_ANDROID_TOOLCHAIN_DIR)/sysroot \ + -B$(LLVM_ANDROID_TOOLCHAIN_DIR) +CFLAGS.asan-arm-android := $(CFLAGS) -fPIC -fno-builtin \ + $(ANDROID_COMMON_FLAGS) -mllvm -arm-enable-ehabi +LDFLAGS.asan-arm-android := $(LDFLAGS) $(ANDROID_COMMON_FLAGS) -ldl + # Use our stub SDK as the sysroot to support more portable building. For now we # just do this for the non-ASAN modules, because the stub SDK doesn't have # enough support to build ASAN. @@ -97,6 +110,8 @@ FUNCTIONS.asan-i386 := $(AsanFunctions) $(InterceptionFunctions) \ $(SanitizerCommonFunctions) FUNCTIONS.asan-x86_64 := $(AsanFunctions) $(InterceptionFunctions) \ $(SanitizerCommonFunctions) +FUNCTIONS.asan-arm-android := $(AsanFunctions) $(InterceptionFunctions) \ + $(SanitizerCommonFunctions) FUNCTIONS.tsan-x86_64 := $(TsanFunctions) $(InterceptionFunctions) \ $(SanitizerCommonFunctions) @@ -105,3 +120,5 @@ OPTIMIZED := 1 # We don't need to use visibility hidden on Linux. VISIBILITY_HIDDEN := 0 + +SHARED_LIBRARY_SUFFIX := so |