[phobos] 64 & 32 bit libraries for OSX

Michel Fortin michel.fortin at michelf.com
Tue Nov 8 19:19:37 PST 2011


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


-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/





More information about the phobos mailing list