Using xcrun

Mar 22, 2019 • 预计阅读时间 1 分钟

Run a command with special toolchain

# using clang of toolchain org.llvm.8.0.0
xcrun --toolchain org.llvm.8.0.0 clang -v

output

clang version 8.0.0 
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/LLVM8.0.0.xctoolchain/usr/bin

Show SDK path

xcrun --show-sdk-path --sdk iphoneos
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk
xcrun --show-sdk-path --sdk iphonesimulator
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk
xcrun --show-sdk-path --sdk macosx
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
版权声明:如果转发请带上本文链接和注明来源。

lvv.me

iOS/macOS Developer

fatal: cannot run gpg: No such file or directory

build LLVM 8 on macOS