[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:16:47 PDT 2026


================
@@ -823,6 +823,15 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
 
   if (!DriverArgs.hasArg(options::OPT_nobuiltininc) && getTriple().isMusl())
     addSystemInclude(DriverArgs, CC1Args, ResourceDirInclude);
+
+  // For GCC compatibility, add an implicit include for musl-based
----------------
MaskRay wrote:

Both glibc and musl should have this. GCC includes this header for all glibc systems.

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


More information about the cfe-commits mailing list