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 --version //----response Apple LLVM version 7.0.0 (clang-700.1.76) Target: x86_64-apple-darwin15.0.0 Thread model: posix
But I am not able to understand what (clang-700.1.76)
mean. How can I convert this code to a clang version?
This is the site where you could check c++ features available in clang version http://clang.llvm.org/cxx_status.html
In the CMakeLists. txt file, look for the line that sets the LLVM_VERSION_MAJOR variable. The MAJOR, MINOR and PATCH versions will give you the exact version of LLVM on which the Apple build is based. For Xcode 13.4, where Apple Clang reports a version of 13.1.
Xcode's default toolchain bundled with clang 13. But clang bundled with Swift Open Source toolchain is 10 which behaves different to the default toolchain of current version of Xcode (Xcode 13.1) when compiling Swift project with C++ sources.
Clang operates in tandem with the LLVM compiler back end and has been a subproject of LLVM 2.6 and later. As with LLVM, it is free and open-source software under the Apache License 2.0 software license. Its contributors include Apple, Microsoft, Google, ARM, Sony, Intel, and AMD.
Wikipedia's Xcode page has a map of Apple to LLVM versions. The LLVM column has the open-source LLVM/Clang version. From this you can look up a language feature in cppreference's chart of compiler support for language features.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With