diff options
author | Chris Bieneman <beanz@apple.com> | 2016-06-03 23:15:04 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-06-03 23:15:04 +0000 |
commit | b6fb3833302de9d890a0232efb7bceb632e215db (patch) | |
tree | 258b859ede6bc093c3ab9b4aaff4a29ae8143a99 /cmake/base-config-ix.cmake | |
parent | 82434492a98309d71e14a505a2e2473521b1e9e2 (diff) |
[CMake] Support constructing output paths from LLVM variables
This tweak to constructing output paths allows compiler-rt to use LLVM
output variables if they are set regardless of whether or not the build
is in-tree.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271749 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/base-config-ix.cmake')
-rw-r--r-- | cmake/base-config-ix.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake index 5d0502c3c..5d71fa9c1 100644 --- a/cmake/base-config-ix.cmake +++ b/cmake/base-config-ix.cmake @@ -9,7 +9,13 @@ check_include_file(unwind.h HAVE_UNWIND_H) # Top level target used to build all compiler-rt libraries. add_custom_target(compiler-rt ALL) -if (NOT COMPILER_RT_STANDALONE_BUILD) +# Setting these variables from an LLVM build is sufficient that compiler-rt can +# construct the output paths, so it can behave as if it were in-tree here. +if (LLVM_LIBRARY_OUTPUT_INTDIR AND LLVM_RUNTIME_OUTPUT_INTDIR AND PACKAGE_VERSION) + set(LLVM_TREE_AVAILABLE On) +endif() + +if (LLVM_TREE_AVAILABLE) # Compute the Clang version from the LLVM version. # FIXME: We should be able to reuse CLANG_VERSION variable calculated # in Clang cmake files, instead of copying the rules here. |