Get Apple clang version and corresponding upstream LLVM version

前端 未结 9 2148
梦如初夏
梦如初夏 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:51

    As hinted by pkolbus, you can look at the /src/CMakeLists.txt to guess the corresponding Clang version. For example, Apple Clang 800.0.38 and 800.0.42.1 both seem to based on Clang 3.9.0 according to

    if(NOT DEFINED LLVM_VERSION_MAJOR)
      set(LLVM_VERSION_MAJOR 3)
    endif()
    if(NOT DEFINED LLVM_VERSION_MINOR)
      set(LLVM_VERSION_MINOR 9)
    endif()
    if(NOT DEFINED LLVM_VERSION_PATCH)
      set(LLVM_VERSION_PATCH 0)
    endif()
    if(NOT DEFINED LLVM_VERSION_SUFFIX)
      set(LLVM_VERSION_SUFFIX svn)
    endif()
    

提交回复
热议问题