================
@@ -1104,6 +1104,23 @@ class LLVM_LIBRARY_VISIBILITY QURTTargetInfo : public
OSTargetInfo<Target> {
using OSTargetInfo<Target>::OSTargetInfo;
};
+// SerenityOS target
+template <typename Target>
+class LLVM_LIBRARY_VISIBILITY SerenityTargetInfo : public OSTargetInfo<Target>
{
+protected:
+ void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
+ MacroBuilder &Builder) const override {
+ Builder.defineMacro("__serenity__");
----------------
MaskRay wrote:
Test in clang/test/Preprocessor/init.c or in a new file `init-serenityos.c`
https://github.com/llvm/llvm-project/pull/187941
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits