[llvm] [llvm-libgcc][CMake] Refactor llvm-libgcc (PR #65455)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 01:48:58 PDT 2023


================
@@ -1,19 +1,26 @@
-cmake_minimum_required(VERSION 3.20.0)
+#===============================================================================
+# Setup Project
+#===============================================================================
 
-if (NOT IS_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/../libunwind")
-  message(FATAL_ERROR "llvm-libgcc requires being built in a monorepo layout with libunwind available")
-endif()
+cmake_minimum_required(VERSION 3.20.0)
 
 set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
 
-list(APPEND CMAKE_MODULE_PATH
+# Add path for custom modules
+list(INSERT CMAKE_MODULE_PATH 0
   "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
   "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules"
+  "${CMAKE_CURRENT_SOURCE_DIR}/../runtimes/cmake/Modules"
   "${LLVM_COMMON_CMAKE_UTILS}"
   "${LLVM_COMMON_CMAKE_UTILS}/Modules"
   )
 
-project(llvm-libgcc LANGUAGES C CXX ASM)
----------------
ur4t wrote:

`libunwind/CMakeLists.txt` does not contains a `project(libunwind LANGUAGES C CXX ASM)`. To keep consistent with `libunwind/CMakeLists.txt`, `project(llvm-libgcc LANGUAGES C CXX ASM)` is not added.

https://github.com/llvm/llvm-project/pull/65455


More information about the llvm-commits mailing list