[clang] [llvm] [clang][mlibc] Predefine `__mlibc__` for mlibc targets (PR #225654)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 27 11:03:17 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()) {
----------------
efriedma-quic wrote:
Please leave out the isGNUEnvironment() check in the initial patch, to keep this about mlibc specifically, so this doesn't have unexpected effects. Maybe we can do this in a followup.
https://github.com/llvm/llvm-project/pull/225654
More information about the llvm-commits
mailing list