我试图为iOS模拟器交叉编译lib:
export CC="clang -arch i386 -mios-version-min=5.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk"
export CXX="clang++ -arch i386 -mios-version-min=5.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk"
../configure --prefix=/Users/asmirnov/Documents/dev/src/libadx_installed --enable-optimized --disable-assertions
unset CC CXX
make VERBOSE=1 -j4
我收到错误:
clang: error: invalid argument '-mmacosx-version-min=10.9' not allowed with '-miphoneos-version-min=5.0'
因为我正在使用-miphoneos-version-min
参数编译ios,并以某种方式自动添加-mmacosx-version-min=10.9
。
我该如何解决?
更新:make VERBOSE = 1
llvm[3]: Linking Release Loadable Module LLVMHello.dylib
clang++ -O3 -rdynamic -Wl,-rpath -Wl,@executable_path/../lib -L/Users/asmirnov/Documents/dev/src/llvm_34_build_i386/Release/lib -L/Users/asmirnov/Documents/dev/src/llvm_34_build_i386/Release/lib -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -miphoneos-version-min=5.0 -stdlib=libc++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -miphoneos-version-min=5.0 -stdlib=libc++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -miphoneos-version-min=5.0 -stdlib=libc++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -miphoneos-version-min=5.0 -stdlib=libc++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -miphoneos-version-min=5.0 -stdlib=libc++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -miphoneos-version-min=5.0 -stdlib=libc++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -miphoneos-version-min=5.0 -stdlib=libc++ -m32 -Wl,-flat_namespace -Wl,-undefined,suppress -dynamiclib -mmacosx-version-min=10.9 -o /Users/asmirnov/Documents/dev/src/llvm_34_build_i386/Release/lib/LLVMHello.dylib /Users/asmirnov/Documents/dev/src/llvm_34_build_i386/lib/Transforms/Hello/Release/Hello.o \
-Wl,-exported_symbols_list,/Users/asmirnov/Documents/dev/src/llvm_34_build_i386/lib/Transforms/Hello/Release/Hello.exports.sed -lz -lpthread -lcurses -lm
clang: error: invalid argument '-mmacosx-version-min=10.9' not allowed with '-miphoneos-version-min=5.0'
答案 0 :(得分:0)
这是lib的Makefile中的错误,通过删除包含' mmacosx-version-min'的行来修复。默认情况下,它添加了mmacosx-version-min'对于非ARM构建由于某种原因