[compiler-rt] r200546 - Enable compilation of RT on ARM

Renato Golin renato.golin at linaro.org
Fri Jan 31 06:25:58 PST 2014


Author: rengolin
Date: Fri Jan 31 08:25:58 2014
New Revision: 200546

URL: http://llvm.org/viewvc/llvm-project?rev=200546&view=rev
Log:
Enable compilation of RT on ARM

Adding the ARM RT sources to the CMake files, and enabling some
sanitizers to also build on ARM. This is far from supported or
production quality, but enabling it to build will get us errors
that we can actually fix.

Having said that, the Compiler-RT and the Asan libraries are
know to work on some variations of ARM.

Modified:
    compiler-rt/trunk/CMakeLists.txt
    compiler-rt/trunk/lib/CMakeLists.txt
    compiler-rt/trunk/lib/lsan/CMakeLists.txt
    compiler-rt/trunk/lib/profile/CMakeLists.txt

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=200546&r1=200545&r2=200546&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Fri Jan 31 08:25:58 2014
@@ -98,6 +98,8 @@ if("${LLVM_NATIVE_ARCH}" STREQUAL "X86")
   test_target_arch(i386 ${TARGET_32_BIT_CFLAGS})
 elseif("${LLVM_NATIVE_ARCH}" STREQUAL "PowerPC")
   test_target_arch(powerpc64 ${TARGET_64_BIT_CFLAGS})
+elseif("${LLVM_NATIVE_ARCH}" STREQUAL "ARM")
+  test_target_arch(arm "")
 endif()
 
 # We only support running instrumented tests when we're not cross compiling
@@ -212,7 +214,7 @@ endif()
 # Architectures supported by Sanitizer runtimes. Specific sanitizers may
 # support only subset of these (e.g. TSan works on x86_64 only).
 filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH
-  x86_64 i386 powerpc64)
+  x86_64 i386 powerpc64 arm)
 
 add_subdirectory(include)
 

Modified: compiler-rt/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/CMakeLists.txt?rev=200546&r1=200545&r2=200546&view=diff
==============================================================================
--- compiler-rt/trunk/lib/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/CMakeLists.txt Fri Jan 31 08:25:58 2014
@@ -195,8 +195,72 @@ set(i386_SOURCES
   i386/umoddi3.S
   ${GENERIC_SOURCES})
 
+set(arm_SOURCES
+  arm/adddf3vfp.S
+  arm/extendsfdf2vfp.S
+  arm/nedf2vfp.S
+  arm/addsf3vfp.S
+  arm/fixdfsivfp.S
+  arm/negdf2vfp.S
+  arm/aeabi_dcmp.S
+  arm/fixsfsivfp.S
+  arm/negsf2vfp.S
+  arm/aeabi_fcmp.S
+  arm/fixunsdfsivfp.S
+  arm/nesf2vfp.S
+  arm/aeabi_idivmod.S
+  arm/fixunssfsivfp.S
+  arm/restore_vfp_d8_d15_regs.S
+  arm/aeabi_ldivmod.S
+  arm/floatsidfvfp.S
+  arm/save_vfp_d8_d15_regs.S
+  arm/aeabi_memcmp.S
+  arm/floatsisfvfp.S
+  arm/aeabi_memcpy.S
+  arm/floatunssidfvfp.S
+  arm/subdf3vfp.S
+  arm/aeabi_memmove.S
+  arm/floatunssisfvfp.S
+  arm/subsf3vfp.S
+  arm/aeabi_memset.S
+  arm/gedf2vfp.S
+  arm/switch16.S
+  arm/aeabi_uidivmod.S
+  arm/gesf2vfp.S
+  arm/switch32.S
+  arm/aeabi_uldivmod.S
+  arm/gtdf2vfp.S
+  arm/switch8.S
+  arm/bswapdi2.S
+  arm/gtsf2vfp.S
+  arm/switchu8.S
+  arm/bswapsi2.S
+  arm/ledf2vfp.S
+  arm/sync_synchronize.S
+  arm/comparesf2.S
+  arm/lesf2vfp.S
+  arm/truncdfsf2vfp.S
+  arm/divdf3vfp.S
+  arm/ltdf2vfp.S
+  arm/udivmodsi4.S
+  arm/divmodsi4.S
+  arm/ltsf2vfp.S
+  arm/udivsi3.S
+  arm/divsf3vfp.S
+  arm/Makefile.mk
+  arm/umodsi3.S
+  arm/divsi3.S
+  arm/modsi3.S
+  arm/unorddf2vfp.S
+  arm/eqdf2vfp.S
+  arm/muldf3vfp.S
+  arm/unordsf2vfp.S
+  arm/eqsf2vfp.S
+  arm/mulsf3vfp.S
+  ${GENERIC_SOURCES})
+
 if (NOT WIN32)
-  foreach(arch x86_64 i386)
+  foreach(arch x86_64 i386 arm)
     if(CAN_TARGET_${arch})
       add_compiler_rt_static_runtime(clang_rt.${arch} ${arch}
         SOURCES ${${arch}_SOURCES}

Modified: compiler-rt/trunk/lib/lsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/CMakeLists.txt?rev=200546&r1=200545&r2=200546&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/lsan/CMakeLists.txt Fri Jan 31 08:25:58 2014
@@ -20,7 +20,7 @@ set(LSAN_SRC_DIR ${CMAKE_CURRENT_SOURCE_
 # The common files need to build on every arch supported by ASan.
 # (Even if they build into dummy object files.)
 filter_available_targets(LSAN_COMMON_SUPPORTED_ARCH
-  x86_64 i386 powerpc64)
+  x86_64 i386 powerpc64 arm)
 
 # Architectures supported by the standalone LSan.
 filter_available_targets(LSAN_SUPPORTED_ARCH

Modified: compiler-rt/trunk/lib/profile/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/CMakeLists.txt?rev=200546&r1=200545&r2=200546&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/profile/CMakeLists.txt Fri Jan 31 08:25:58 2014
@@ -2,7 +2,7 @@ set(PROFILE_SOURCES
   GCDAProfiling.c
   PGOProfiling.c)
 
-filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386)
+filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 arm)
 
 if(APPLE)
   add_compiler_rt_osx_static_runtime(clang_rt.profile_osx





More information about the llvm-commits mailing list