How can I reliably detect the version of clang at preprocessing time?

后端 未结 1 1975
渐次进展
渐次进展 2021-01-12 10:18

Apparently, the clang bundled with Xcode doesn\'t respect the upstream __clang_major__ and __clang_minor__ values, and instead reports an Xcode use

相关标签:
1条回答
  • 2021-01-12 10:42

    If the feature checking macros don't cover what you need to check for then you do need to treat vendor releases separately as they may have very different content from the open source LLVM releases. You can use __apple_build_version__ to check for a specific Apple LLVM version.

    0 讨论(0)
提交回复
热议问题