Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the LLVM version bundled with Xcode?

Up to Xcode 6 when typing clang --version we got the information on what LLVM version it was built:

Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)

But now with Xcode 7 we only get the following:

Apple LLVM version 7.0.0 (clang-700.0.72)
like image 223
Kevin MOLCARD Avatar asked Oct 07 '15 07:10

Kevin MOLCARD


People also ask

Does Xcode include LLVM?

Xcode also includes the LLVM GCC compiler, which uses the GCC compiler front end for maximum compatibility, and the LLVM back end, which takes advantage of LLVM's advanced code generator. This shows the flexibility of a library-based approach to compiler development.

What version of Clang does Xcode use?

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.

How do I find my Apple Clang version?

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.


1 Answers

The wiki had show us already. https://en.wikipedia.org/wiki/Xcode#Latest_versions

Actually we can check swift version the Xcode used, and see the llvm version in swift-llvm

For Xcode 10, the swift version is 4.2, from CMakeLists.txt we can get the llvm version is 6.0.1 if(NOT DEFINED LLVM_VERSION_MAJOR) set(LLVM_VERSION_MAJOR 6) endif() if(NOT DEFINED LLVM_VERSION_MINOR) set(LLVM_VERSION_MINOR 0) endif() if(NOT DEFINED LLVM_VERSION_PATCH) set(LLVM_VERSION_PATCH 1) endif()

And Apple should not use two versions of llvm in clang and swift :)

like image 75
J1ngB0 Avatar answered Sep 21 '22 13:09

J1ngB0