[libc-commits] [libc] [libc] Find Python 3 in standalone (PR #118871)

Carlo Cabrera via libc-commits libc-commits at lists.llvm.org
Mon Dec 9 20:53:33 PST 2024


================
@@ -8,6 +8,13 @@ endif()
 include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
   NO_POLICY_SCOPE)
 
+# If we are not building as a part of LLVM, build libc as an
+# standalone project, using LLVM as an external library:
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+  project(libc)
+  set(LIBC_BUILT_STANDALONE TRUE)
+endif()
----------------
carlocab wrote:

Given that `libc` doesn't support builds rooted in the `libc` directory (and I don't think we want to add support for it), maybe we should be erroring out here instead.

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


More information about the libc-commits mailing list