From 68ca8edd87dd8dfffd882c66db28bb98df7e2b24 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Fri, 19 Aug 2016 06:46:00 +0000 Subject: [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 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') 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() -- cgit v1.2.3