llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: lzcnt (lzcunt) <details> <summary>Changes</summary> Pretty much all users of mlibc targets currently vendor this or similar patches and having it upstream would be useful. --- Full diff: https://github.com/llvm/llvm-project/pull/225654.diff 1 Files Affected: - (modified) clang/lib/Basic/Targets/OSTargets.h (+3) ``````````diff diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h index fb5c17cefc004..36354668de69c 100644 --- a/clang/lib/Basic/Targets/OSTargets.h +++ b/clang/lib/Basic/Targets/OSTargets.h @@ -396,6 +396,9 @@ class LLVM_LIBRARY_VISIBILITY LinuxTargetInfo : public OSTargetInfo<Target> { } else { Builder.defineMacro("__gnu_linux__"); } + if (Triple.getEnvironmentName() == "mlibc") { + Builder.defineMacro("__mlibc__"); + } if (Opts.POSIXThreads) Builder.defineMacro("_REENTRANT"); if (Opts.CPlusPlus) `````````` </details> https://github.com/llvm/llvm-project/pull/225654 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
