[libc-commits] [libc] [libc] Use -nostdlibinc in the full build mode (PR #97461)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue Jul 2 12:18:47 PDT 2024


================
@@ -73,3 +73,6 @@ check_cxx_compiler_flag("-ftrivial-auto-var-init=pattern" LIBC_CC_SUPPORTS_PATTE
 
 # clang-6+, gcc-13+
 check_cxx_compiler_flag("-nostdlib++" LIBC_CC_SUPPORTS_NOSTDLIBPP)
+
+# clang-3.0+
+check_c_compiler_flag("-nostdlibinc" LIBC_C_SUPPORTS_NOSTDLIBINC)
----------------
jhuber6 wrote:

```suggestion
check_c_compiler_flag("-nostdlibinc" LIBC_C_SUPPORTS_NOSTDLIBINC)
```
Isn't this a `CXX` project? Wouldn't make sense to require both C and CXX compiler to be set and match if so.

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


More information about the libc-commits mailing list