指定真机
xcrun -sdk iphoneos clang -rewrite-objc main.m
指定模拟器
xcrun -sdk iphonesimulator clang -rewrite-objc main.m
指定sdk
xcrun -sdk iphonesimulator14.2 clang -rewrite-objc main.m
将C转C++
clang -rewrite-objc main.c
查看机器上装有的的sdk
xcodebuild -showsdks
引入Framework使用-F
xcrun -sdk iphonesimulator14.2 clang -rewrite-objc -F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS10.3.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks main.m