[libc-commits] [libc] [libc] Fail fast when building standalone (PR #119426)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Tue Dec 10 10:26:11 PST 2024


================
@@ -1,6 +1,12 @@
 cmake_minimum_required(VERSION 3.20.0)
 set(LLVM_SUBPROJECT_TITLE "libc")
 
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+  message(FATAL_ERROR "Builds rooted in the libc directory are not supported. "
+    "Please see the documentation at https://libc.llvm.org/usage_modes.html for links to build "
+    "instructions depending how you plan to use libc.")
----------------
nickdesaulniers wrote:

```suggestion
    "Builds should be rooted in the runtimes directory instead."
    "Please see the documentation at https://libc.llvm.org/usage_modes.html for more info.")
```

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


More information about the libc-commits mailing list