1.下载xz源码:
使用autogen.sh生成configure文件
2.生成makefile
rm -rf ./build/iOS && mkdir -p ./build/iOS && cd ./build/iOS && ../../configure --host=arm-apple-darwin64 --prefix=`pwd`/Frameworks/lzma CC="xcrun -sdk iphoneos clang -arch arm64" CFLAGS="-arch arm64 -fembed-bitcode -miphoneos-version-min=15.0" --with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.1.sdk CXX="xcrun -sdk iphoneos clang++ -arch arm64" CXXFLAGS="-arch arm64 -miphoneos-version-min=15.0"