On Tuesday 13 January 2015 17:06:55 Vladimir Prus wrote:
On 01/13/2015 04:45 PM, mefyl wrote:
On Tuesday 13 January 2015 13:49:29 Akim Demaille wrote:
Le 13 janv. 2015 à 13:42, Vladimir Prus
a écrit : +flags clang-darwing OPTIONS <architecture>arm <address-model>64 : -arch arm64
Isn't darwing a typo?
I took the liberty of fixing that to "darwin" =)
Thanks a lot, works like a charm ! For the record, all you need to add is the SDKROOT so clang finds the iPhone headers:
$ SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.pla tform/Developer/SDKs/iPhoneOS8.1.sdk ./b2 -q toolset=clang architecture=arm abi=aapcs address-model=64 binary-format=mach-o [...] $ lipo -info bin.v2/libs/context/build/clang-darwin-4.2.1/release/abi-aapcs/address-mo del-64/architecture-arm/threading-multi/libboost_context.dylib Non-fat file: bin.v2/libs/context/build/clang-darwin-4.2.1/release/abi-aapcs/address-mo del-64/architecture-arm/threading-multi/libboost_context.dylib is architecture: arm64 Cool. Could you suggest entire set of -arch options that should be added to clang-darwin.jam?
Sure, here are the ones I actively use: flags clang-darwin OPTIONS <architecture>arm <address-model>32 : -arch armv7 ; flags clang-darwingOPTIONS <architecture>arm <address-model>64 : -arch arm64 ; flags clang-darwin OPTIONS <architecture>x86 <address-model>32 : -arch x86 ; flags clang-darwin OPTIONS <architecture>x86 <address-model>64 : -arch x86_64 ;
From the clang documentation, I would infer these, altough I can't test them:
flags clang-darwin OPTIONS <architecture>sparc : -arch sparc ; // sparcv9 also exists flags clang-darwin OPTIONS <architecture>power <address-model>32 : -arch ppc ; flags clang-darwin OPTIONS <architecture>power <address-model>64 : -arch ppc64 ; I'm not really fluent about mips. Boost has: "mips1" "mips2" "mips3" "mips4" "mips32" "mips32r2" "mips64" clang has: mips, // MIPS: mips, mipsallegrex mipsel, // MIPSEL: mipsel, mipsallegrexel mips64, // MIPS64: mips64 mips64el,// MIPS64EL: mips64el msp430, // MSP430: msp430 Additionnaly, clang can create Apple fat objects and libraries combining several architecture by passing multiple -arch option. By building with "-arm x86_64 -arch arm -arch arm64" you get libraries working on 32 or 64 bits phones as well as the emulator, for instance. However, I suppose it wouldn't be practical to do this with boost.build since different set of files/option should be picked in the same build? One can build three times and merge libraries afterwards anyway. Cheers, -- Quentin "mefyl" Hocquet CTO @ infinit.io