I noticed on mac that some of my shared objects (dylib) are binaries with two architectures. I believe this can be achieved by separately compiling for i386 and x86_64, then using the lipo utility to create the universal executable
$ file /usr/lib/libpoll.dylib
/usr/lib/libpoll.dylib: Mach-O universal binary with 2 architectures
/usr/lib/libpoll.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
/usr/lib/libpoll.dylib (for architecture i386): Mach-O dynamically linked shared library i386
However as far as I have spot checked .dll files on my windows system, they are all of one architecture. Here are some ways to check the architecture a .dll was compiled for
Is there a way I can compile a single .dll file for two different architectures (ex. both x86_64 and i386)?