[phobos] 64 & 32 bit libraries for OSX

Walter Bright walter at digitalmars.com
Thu Nov 10 12:12:00 PST 2011

On 11/8/2011 7:19 PM, Michel Fortin wrote:
> Le 2011-11-08 à 20:45, Walter Bright a écrit :
>> On Linux, the 64 bit and 32 bit libraries exist along separate paths, and we put both paths on the command to the linker:
>> DFLAGS=-I%@P%/../../src/phobos -I%@P%/../../src/druntime/import -L-L%@P%/../lib32 -L-L%@P%/../lib64
>> -L--no-warn-search-mismatch -L--export-dynamic
>> However, attempting to do this on OSX fails (using -L-no_arch_warnings instead of -L--no-warn-search-mismatch). It apparently always tries to link in the first library found, not the first one with matching architecture.
>> What is the right way on OSX to do a dual-architecture library?
> Fuse both architectures into one "fat" file using lipo:
> 	lipo lib32/libphobos.a lib64/libphobos.a -create -output lib/libphobos.a

Thanks. I'll give it a whirl. That's just what I was looking for.

More information about the phobos mailing list