builtins: re-enable building assembly sources

Re-apply SVN r213684 which was reverted in SVN r213724 since it broke the
build bots.  Add a tweak to enable inclusion of the assembly sources in
standalone build as well.

Original commit message:

This patch address the PR20360. The CMake assembler build system
ignores the .S assembly files in builtins library build. This patch
fixes the issue.

llvm-svn: 214013
This commit is contained in:
Saleem Abdulrasool 2014-07-26 04:04:02 +00:00
parent 93efc78a04
commit 7618240aa9
2 changed files with 2 additions and 1 deletions

View File

@ -9,7 +9,7 @@
# Check if compiler-rt is built as a standalone project.
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(CompilerRT)
project(CompilerRT ASM C CXX)
set(COMPILER_RT_STANDALONE_BUILD TRUE)
else()
set(COMPILER_RT_STANDALONE_BUILD FALSE)

View File

@ -251,6 +251,7 @@ add_custom_target(builtins)
if (NOT WIN32)
foreach(arch x86_64 i386 arm)
if(CAN_TARGET_${arch})
set_source_files_properties(${${arch}_SOURCES} PROPERTIES LANGUAGE C)
add_compiler_rt_runtime(clang_rt.builtins-${arch} ${arch} STATIC
SOURCES ${${arch}_SOURCES}
CFLAGS "-std=c99")