[cfe-dev] cross-compilation llvm/clang 3.4 for ios simulator
Anton Smirnov
dev at antonsmirnov.name
Wed Jun 4 09:38:43 PDT 2014
hey, guys.
i'm trying to cross-compile llvm/clang 3.4 for ios simulator:
export
CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-arch i386 -Wno-extended-offsetof -miphoneos-version-min=5.0
-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/include
-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk"
export
CPP="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cpp"
export
AR="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar"
export LDFLAGS="-arch i386 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk
-miphoneos-version-min=5.0 -stdlib=libc++"
../llvm_34_ios/configure
--prefix=/Users/asmirnov/Documents/dev/src/llvm_34_ios_i386_installed
--enable-optimized --disable-assertions
unset CC CXX CPP
make VERBOSE=1 -4
after compilation for about 10 minutes i'm getting an error:
clang: error: invalid argument '-mmacosx-version-min=10.9' not allowed with
'-miphoneos-version-min=5.0'
here is the full compilation command line:
llvm[3]: Linking Release Loadable Module LLVMHello.dylib
clang++ -O3 -rdynamic -Wl,-rpath -Wl, at 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'
Note that '-mmacosx-version-min=10.9' was absent in my script and it was
appended by toolchain probably.
How to fix/walk-around it? Any thoughts are highly appreciated.
Regards, Anton.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140604/e8de92c3/attachment.html>
More information about the cfe-dev
mailing list