[clang] [llvm] [clang][mlibc] Predefine `__mlibc__` for mlibc targets (PR #225654)

via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 27 11:41:09 PDT 2026


================
@@ -393,7 +393,9 @@ class LLVM_LIBRARY_VISIBILITY LinuxTargetInfo : public OSTargetInfo<Target> {
         // defined for compatibility.
         Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
       }
-    } else {
+    } else if (Triple.isMlibc()) {
+        Builder.defineMacro("__mlibc__");
+    } else if (Triple.isGNUEnvironment()) {
----------------
lzcunt wrote:

Understood, I'll keep these out of this patch but I'll keep isMlibc

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


More information about the llvm-commits mailing list