summaryrefslogtreecommitdiff
path: root/compiler-rt
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/CMakeLists.txt9
-rw-r--r--compiler-rt/lib/builtins/CMakeLists.txt9
-rw-r--r--compiler-rt/lib/crt/CMakeLists.txt9
3 files changed, 24 insertions, 3 deletions
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index 8485fe9232d0..c5a7b2478e50 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -3,13 +3,20 @@
# An important constraint of the build is that it only produces libraries
# based on the ability of the host toolchain to target various platforms.
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
# Check if compiler-rt is built as a standalone project.
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)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+ if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+ message(WARNING
+ "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+ "minimum version of CMake required to build LLVM will become 3.20.0, and "
+ "using an older CMake will become an error. Please upgrade your CMake to "
+ "at least 3.20.0 now to avoid issues in the future!")
+ endif()
endif()
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index c3e22a8f354f..a302306cc302 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -3,7 +3,14 @@
# architecture-specific code in various subdirectories.
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
- cmake_minimum_required(VERSION 3.20.0)
+ cmake_minimum_required(VERSION 3.13.4)
+ if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+ message(WARNING
+ "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+ "minimum version of CMake required to build LLVM will become 3.20.0, and "
+ "using an older CMake will become an error. Please upgrade your CMake to "
+ "at least 3.20.0 now to avoid issues in the future!")
+ endif()
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(CompilerRTBuiltins C ASM)
diff --git a/compiler-rt/lib/crt/CMakeLists.txt b/compiler-rt/lib/crt/CMakeLists.txt
index 32fd61b1fa11..771652f438f8 100644
--- a/compiler-rt/lib/crt/CMakeLists.txt
+++ b/compiler-rt/lib/crt/CMakeLists.txt
@@ -1,5 +1,12 @@
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
- cmake_minimum_required(VERSION 3.20.0)
+ cmake_minimum_required(VERSION 3.13.4)
+ if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+ message(WARNING
+ "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+ "minimum version of CMake required to build LLVM will become 3.20.0, and "
+ "using an older CMake will become an error. Please upgrade your CMake to "
+ "at least 3.20.0 now to avoid issues in the future!")
+ endif()
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(CompilerRTCRT C)