[PATCH] D51441: Add predefined macro __gnu_linux__ for proper aux-triple

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 29 10:52:46 PDT 2018


tra added inline comments.


================
Comment at: lib/Frontend/InitPreprocessor.cpp:1126
     Builder.defineMacro("__linux__");
+    if (AuxTriple.getEnvironment() == llvm::Triple::GNU)
+      Builder.defineMacro("__gnu_linux__");
----------------
AFAICT, we always define `__gnu_linix__` on Linux:
https://github.com/llvm-mirror/clang/blob/master/lib/Basic/Targets/OSTargets.h#L306

I think it should be the case here, too.


https://reviews.llvm.org/D51441





More information about the cfe-commits mailing list