[polly] 4c51142 - [Polly] Don't use `llvm-config` anymore (in CMake sad path)
John Ericson via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 23 19:47:23 PDT 2022
Author: John Ericson
Date: 2022-08-23T22:47:14-04:00
New Revision: 4c5114250bb75fdbd83e36256469d4f291549388
URL: https://github.com/llvm/llvm-project/commit/4c5114250bb75fdbd83e36256469d4f291549388
DIFF: https://github.com/llvm/llvm-project/commit/4c5114250bb75fdbd83e36256469d4f291549388.diff
LOG: [Polly] Don't use `llvm-config` anymore (in CMake sad path)
If `LLVM_BUILD_MAIN_SRC_DIR` is not defined, just assume we are in
regular monorepo layout. Non-standard (and not really supported) layouts
can still be configured manually.
Reviewed By: beanz
Differential Revision: https://reviews.llvm.org/D132314
Added:
Modified:
polly/CMakeLists.txt
Removed:
################################################################################
diff --git a/polly/CMakeLists.txt b/polly/CMakeLists.txt
index 6a6e78b06bb2d..2e906fdd8fc73 100644
--- a/polly/CMakeLists.txt
+++ b/polly/CMakeLists.txt
@@ -20,14 +20,11 @@ if(POLLY_STANDALONE_BUILD)
# Sources available, too?
if (LLVM_BUILD_MAIN_SRC_DIR)
- set(LLVM_SOURCE_ROOT ${LLVM_BUILD_MAIN_SRC_DIR} CACHE PATH
- "Path to LLVM source tree")
+ set(default_llvm_src "${LLVM_BUILD_MAIN_SRC_DIR}")
else()
- execute_process(COMMAND "${LLVM_TOOLS_BINARY_DIR}/llvm-config" --src-root
- OUTPUT_VARIABLE MAIN_SRC_DIR
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- set(LLVM_SOURCE_ROOT ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
+ set(default_llvm_src "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
endif()
+ set(LLVM_SOURCE_ROOT ${default_llvm_src} CACHE PATH "Path to LLVM source tree")
# Enable unit tests if available.
set(POLLY_GTEST_AVAIL 0)
More information about the llvm-commits
mailing list