summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-03-19 09:17:35 +0000
committerAlexey Samsonov <samsonov@google.com>2013-03-19 09:17:35 +0000
commitc9de451e97b85e9712939ac2bfb02295645e2e0f (patch)
tree7ae0943977a36b33ddd6b142156c44efef72163e /CMakeLists.txt
parent210ce0ee0190170ca6fab6f5d953885ce5f9ac89 (diff)
downloadcompiler-rt-c9de451e97b85e9712939ac2bfb02295645e2e0f.tar.gz
compiler-rt-c9de451e97b85e9712939ac2bfb02295645e2e0f.tar.bz2
compiler-rt-c9de451e97b85e9712939ac2bfb02295645e2e0f.tar.xz
Support CMake build of profile runtime library on Linux
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 90062cd1..240572e3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,10 +23,10 @@ string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
# Setup the paths where compiler-rt runtimes and headers should be stored.
set(LIBCLANG_INSTALL_PATH lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION})
string(TOLOWER ${CMAKE_SYSTEM_NAME} LIBCLANG_OS_DIR)
-set(COMPILER_RT_LIBRARY_OUTPUT_DIR
- ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/lib/${LIBCLANG_OS_DIR})
+set(CLANG_RESOURCE_DIR ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION})
+set(COMPILER_RT_LIBRARY_OUTPUT_DIR ${CLANG_RESOURCE_DIR}/lib/${LIBCLANG_OS_DIR})
set(COMPILER_RT_LIBRARY_INSTALL_DIR
- ${LIBCLANG_INSTALL_PATH}/lib/${LIBCLANG_OS_DIR})
+ ${LIBCLANG_INSTALL_PATH}/lib/${LIBCLANG_OS_DIR})
# Add path for custom modules
set(CMAKE_MODULE_PATH
@@ -36,6 +36,9 @@ set(CMAKE_MODULE_PATH
include(AddCompilerRT)
set(COMPILER_RT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+# Setup custom SDK sysroots.
+set(COMPILER_RT_DARWIN_SDK_SYSROOT ${COMPILER_RT_SOURCE_DIR}/SDKs/darwin)
+set(COMPILER_RT_LINUX_SDK_SYSROOT ${COMPILER_RT_SOURCE_DIR}/SDKs/linux)
# Detect whether the current target platform is 32-bit or 64-bit, and setup
# the correct commandline flags needed to attempt to target 32-bit and 64-bit.