[PATCH] D13131: Allow the builting of the builtins library with a forced compiler.
Vasileios Kalintiris via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 24 06:01:23 PDT 2015
vkalintiris created this revision.
vkalintiris added a reviewer: samsonov.
vkalintiris added a subscriber: llvm-commits.
Herald added subscribers: srhines, danalbert, tberghammer.
When we are trying to create a new LLVM-based toolchain, without using a GCC
toolchain, we don't have a fully-working compiler in the beginning. So, we have
to force the usage of the C compiler and assume that the CMAKE invocation
includes the correct C flags in order to build compiler-rt.
http://reviews.llvm.org/D13131
Files:
cmake/config-ix.cmake
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -168,7 +168,12 @@
endif()
# Generate the COMPILER_RT_SUPPORTED_ARCH list.
-if(ANDROID)
+if(NOT COMPILER_RT_BUILD_SANITIZERS AND CMAKE_C_COMPILER_FORCED)
+ # If the compiler has been forced and we build only the builtins library
+ # assume that the arch is supported.
+ set(CAN_TARGET_${COMPILER_RT_DEFAULT_TARGET_ARCH} 1)
+ list(APPEND COMPILER_RT_SUPPORTED_ARCH ${COMPILER_RT_DEFAULT_TARGET_ARCH})
+elseif(ANDROID)
# Examine compiler output to determine target architecture.
detect_target_arch()
set(COMPILER_RT_OS_SUFFIX "-android")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13131.35615.patch
Type: text/x-patch
Size: 704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150924/6ec99e9f/attachment.bin>
More information about the llvm-commits
mailing list