[compiler-rt] r218761 - [sanitizer] Add i686 arch to compiler-rt.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Wed Oct 1 05:55:06 PDT 2014
Author: eugenis
Date: Wed Oct 1 07:55:06 2014
New Revision: 218761
URL: http://llvm.org/viewvc/llvm-project?rev=218761&view=rev
Log:
[sanitizer] Add i686 arch to compiler-rt.
This is needed so we can produce -i686- named libraries for
x86 Android (which is i686-linux-android).
An alternative solution would be keeping the "i386" name internally and
tweaking the OUTPUT_NAME of compiler-rt libraries.
Modified:
compiler-rt/trunk/cmake/config-ix.cmake
compiler-rt/trunk/lib/asan/CMakeLists.txt
compiler-rt/trunk/lib/builtins/CMakeLists.txt
compiler-rt/trunk/lib/ubsan/CMakeLists.txt
compiler-rt/trunk/test/asan/CMakeLists.txt
Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=218761&r1=218760&r2=218761&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Wed Oct 1 07:55:06 2014
@@ -96,6 +96,7 @@ macro(detect_target_arch)
check_symbol_exists(__arm__ "" __ARM)
check_symbol_exists(__aarch64__ "" __AARCH64)
check_symbol_exists(__x86_64__ "" __X86_64)
+ check_symbol_exists(__i686__ "" __I686)
check_symbol_exists(__i386__ "" __I386)
check_symbol_exists(__mips__ "" __MIPS)
check_symbol_exists(__mips64__ "" __MIPS64)
@@ -105,6 +106,8 @@ macro(detect_target_arch)
add_default_target_arch(aarch64)
elseif(__X86_64)
add_default_target_arch(x86_64)
+ elseif(__I686)
+ add_default_target_arch(i686)
elseif(__I386)
add_default_target_arch(i386)
elseif(__MIPS64) # must be checked before __MIPS
@@ -155,9 +158,9 @@ endfunction()
# Arhcitectures supported by compiler-rt libraries.
filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH
- x86_64 i386 powerpc64 arm aarch64 mips)
+ x86_64 i386 i686 powerpc64 arm aarch64 mips)
filter_available_targets(ASAN_SUPPORTED_ARCH
- x86_64 i386 powerpc64 arm mips)
+ x86_64 i386 i686 powerpc64 arm mips)
filter_available_targets(DFSAN_SUPPORTED_ARCH x86_64)
filter_available_targets(LSAN_SUPPORTED_ARCH x86_64)
# LSan common files should be available on all architectures supported
@@ -165,9 +168,9 @@ filter_available_targets(LSAN_SUPPORTED_
filter_available_targets(LSAN_COMMON_SUPPORTED_ARCH
${SANITIZER_COMMON_SUPPORTED_ARCH})
filter_available_targets(MSAN_SUPPORTED_ARCH x86_64)
-filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 arm aarch64)
+filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 i686 arm aarch64)
filter_available_targets(TSAN_SUPPORTED_ARCH x86_64)
-filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 arm aarch64 mips)
+filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 i686 arm aarch64 mips)
if(ANDROID)
set(OS_NAME "Android")
Modified: compiler-rt/trunk/lib/asan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/CMakeLists.txt?rev=218761&r1=218760&r2=218761&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/CMakeLists.txt Wed Oct 1 07:55:06 2014
@@ -161,7 +161,7 @@ else()
add_dependencies(asan clang_rt.asan-dynamic-${arch})
endif()
- if (UNIX AND NOT ${arch} STREQUAL "i386")
+ if (UNIX AND NOT ${arch} STREQUAL "i386" AND NOT ${arch} STREQUAL "i686")
add_sanitizer_rt_symbols(clang_rt.asan_cxx-${arch})
add_dependencies(asan clang_rt.asan_cxx-${arch}-symbols)
add_sanitizer_rt_symbols(clang_rt.asan-${arch} asan.syms.extra)
Modified: compiler-rt/trunk/lib/builtins/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/CMakeLists.txt?rev=218761&r1=218760&r2=218761&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/builtins/CMakeLists.txt Wed Oct 1 07:55:06 2014
@@ -163,6 +163,9 @@ set(i386_SOURCES
i386/umoddi3.S
${GENERIC_SOURCES})
+set(i686_SOURCES
+ ${i386_SOURCES})
+
set(arm_SOURCES
arm/adddf3vfp.S
arm/addsf3vfp.S
@@ -250,7 +253,7 @@ set(arm_SOURCES
add_custom_target(builtins)
if (NOT WIN32)
- foreach (arch x86_64 i386 arm)
+ foreach (arch x86_64 i386 i686 arm)
if (CAN_TARGET_${arch})
# Filter out generic versions of routines that are re-implemented in
# architecture specific manner. This prevents multiple definitions of the
Modified: compiler-rt/trunk/lib/ubsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/CMakeLists.txt?rev=218761&r1=218760&r2=218761&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/ubsan/CMakeLists.txt Wed Oct 1 07:55:06 2014
@@ -44,7 +44,7 @@ else()
clang_rt.san-${arch}
clang_rt.ubsan-${arch}
clang_rt.ubsan_cxx-${arch})
- if (UNIX AND NOT ${arch} STREQUAL "i386")
+ if (UNIX AND NOT ${arch} STREQUAL "i386" AND NOT ${arch} STREQUAL "i686")
add_sanitizer_rt_symbols(clang_rt.ubsan-${arch} ubsan.syms.extra)
add_sanitizer_rt_symbols(clang_rt.ubsan_cxx-${arch} ubsan.syms.extra)
add_dependencies(ubsan
Modified: compiler-rt/trunk/test/asan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/CMakeLists.txt?rev=218761&r1=218760&r2=218761&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/asan/CMakeLists.txt Wed Oct 1 07:55:06 2014
@@ -5,6 +5,7 @@ set(ASAN_TESTSUITES)
macro(get_bits_for_arch arch bits)
if (${arch} STREQUAL "arm" OR
${arch} STREQUAL "i386" OR
+ ${arch} STREQUAL "i686" OR
${arch} STREQUAL "mips")
set(bits 32)
elseif (${arch} STREQUAL "aarch64" OR
More information about the llvm-commits
mailing list