Get Apple clang version and corresponding upstream LLVM version

前端 未结 9 2141
梦如初夏
梦如初夏 2020-12-05 06:25

I want to understand which version of clang Apple installed in my macbook, to see with c++11 and/or c++14 features are available. I typed this command:

clang         


        
9条回答
  •  無奈伤痛
    2020-12-05 06:46

    Here is the best listing I've found that correlates Apple's clang versions with the LLVM versions:

    https://trac.macports.org/wiki/XcodeVersionInfo

    Previous versions used to say what LLVM version they corresponded to, but starting with 7.0, Apple decided to no longer do that. They even define the __clang_version__ and related preprocessor macros to indicate the Apple version number, not the LLVM version. So they're useless for this as well.

    Unfortunately, it looks like the only way to see if you have a feature is to try it and check if it works. e.g. 7.0.2 still doesn't have OpenMP enabled by default (although it's enable-able), so I guess it's still 3.6, not 3.7 yet.

提交回复
热议问题