How can I find the actual Clang version on Mac?

后端 未结 3 1078
渐次进展
渐次进展 2021-02-19 08:07

Note: None of the answers provided at Get Apple clang version and corresponding upstream LLVM version seems to work anymore.

The download page at http://releases.llvm.or

相关标签:
3条回答
  • 2021-02-19 08:39

    launch terminal and enter:

    clang --version

    Apple clang version 11.0.0 (clang-1100.0.33.16)

    0 讨论(0)
  • 2021-02-19 08:45

    This wikipedia table maps Xcode and Apple clang versions to LLVM versions. Your clang-902.0.39.1 appears to be based on LLVM 5.0.2.

    0 讨论(0)
  • 2021-02-19 08:46

    You could try using

    echo | clang -dM -E - | grep __clang
    

    and maybe that will give you more reliable numbers. Although I'm speculating since I'm not on a Mac.

    Also, clang has had the -pedantic option for a long long time - many versions before 6.0. -pedantic is a GCC option and clang takes after GCC in its options.

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