问题
How to find out which LLVM version is used in Android NDK and Apple Xcode?
Checking clang --version
from Android NDK r15c I got:
Android clang version 5.0.300080 (based on LLVM 5.0.300080)
but NDK r15c was released in July 2017, before actual release of LLVM 5.0 (what happened in September 2017). Does it really use LLVM 5.0?
Checking clang --version
from Xcode only shows Apple's own LLVM version:
Apple LLVM version 9.0.0 (clang-900.0.38)
is there any way to find out to which "unpatched" LLVM version it relates?
回答1:
1) Android. Accordingly to the LLVM source code for Android NDK: http://llvm.org/svn/llvm-project/llvm/tags/google/stable/, it seems that NDK r15c really uses LLVM 5.0 (as contained in CMakeLists.txt).
And right after that release they switched to unreleased yet LLVM 6.0. So it seems that Google tries to use in NDK the latest LLVM version available.
2) iOS. For the Xcode, guys from llvm-dev maillist suggested to look at the branches of swift-llvm repository: https://github.com/apple/swift-llvm - accordingly to that, Swift 4.0 (as well as the current Xcode 9.1 version) uses LLVM 4.0 and the upcoming release of Swift 4.1 (in 2018) will use at least LLVM 5.0.
回答2:
but it was created by llvm5.0.1,can not be read by LLVM
of NDK r15c。
error: Invalid value (Producer: 'LLVM5.0.1' Reader: 'LLVM 5.0.300080')
来源:https://stackoverflow.com/questions/47552782/llvm-version-on-ios-and-android