[clang] [clang][Driver] Include stdc-predef.h by default on musl (PR #202919)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 14 11:15:35 PDT 2026


================
@@ -0,0 +1,95 @@
+// Test that clang preincludes stdc-predef.h if we are using a libc that does
+// not pre-include it, e.g. musl.
+
+// Musl-based systems need this additional include.
+//
+// RUN: %clang %s -### -c 2>&1 \
----------------
MaskRay wrote:

excessive line wrapping.

```
// RUN: %clang %s -### -c --target=... --sysroot ... \
// RUN:   FileCheck
```

Prefer `--target=` to the long-deprecated `-target`

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


More information about the cfe-commits mailing list