Clang predefine macro __linx__ for aux-triple with Linux OS
but does not predefine macro __gnu_linux__. This causes
some compilation error for certain applications, e.g. Eigen.
This patch fixes that.
Differential D51441
Add predefined macro __gnu_linux__ for proper aux-triple yaxunl on Aug 29 2018, 10:06 AM. Authored by
Details Clang predefine macro __linx__ for aux-triple with Linux OS This patch fixes that.
Diff Detail
Event Timeline
Comment Actions While we're here, perhaps Builder.defineMacro("__linux__") should be changed to DefineStd("linux") which defines linux/__linux/__linux__? Comment Actions Sorry DefineStd is a function not available in InitPreprocessor.cpp. To reuse that function refactoring is required, which is out of scope for this patch. |
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.