diff options
author | Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de> | 2016-08-19 06:46:00 +0000 |
---|---|---|
committer | Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de> | 2016-08-19 06:46:00 +0000 |
commit | 68ca8edd87dd8dfffd882c66db28bb98df7e2b24 (patch) | |
tree | 0d88117d317645b27e76f2285a523a28f3f3cf64 /CMakeLists.txt | |
parent | eb30ef947680d412e2699754380a461c3943c9a6 (diff) |
[CMake] Fix ASM building in llvm/runtimes
When compiler-rt's CMake is not directly invoked, it will currently not call
project() and thus ASM will not be enabled.
We also don't need to put the .S files through the C compiler then.
Differential Revision: https://reviews.llvm.org/D23656
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@279215 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f72fb01fc..92eab598f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,14 +1,14 @@ # CMake build for CompilerRT. # # This build assumes that CompilerRT is checked out into the -# 'projects/compiler-rt' inside of an LLVM tree. +# 'projects/compiler-rt' or 'runtimes/compiler-rt' inside of an LLVM tree. # Standalone build system for CompilerRT is not yet ready. # # An important constraint of the build is that it only produces libraries # based on the ability of the host toolchain to target various platforms. # Check if compiler-rt is built as a standalone project. -if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) +if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD) project(CompilerRT C CXX ASM) set(COMPILER_RT_STANDALONE_BUILD TRUE) endif() |