[LLVMdev] Building 64-bit libraries on OS X

Jan Rehders cmdkeen at gmx.de
Mon Feb 9 05:44:43 PST 2009


Hi,

how do I compile LLVM for 64-bit on OS X? I want to get 64-bit libraries which generate x86_64 to link them into a 64-bit application. All my attempts ended up with either 32-bit libraries or errors. My machine is an Intel Xeon quad core, 'sysctl hw.cpu64bit_capable' returns 1 so I think the machine is fine.

- './configure && make' yields 32-bit libraries and executables
- I've tried various variations of ./configure --host X and ./configure --target X. I am not sure which target triple to use (the getting started guide says "The values of these options must be legal target triples that your GCC compiler supports."). Unfortunately I couldn't figure out which target triples to use. I've tried a few but until now I either get an error when calling configure or I simply end up with 32-bit libraries. For instance "i686_x86-apple-darwin9.0.0" results in "Invalid configuration `i686_x86-apple-darwin9.0.0': machine `i686_x86-apple' not recognized". "x86_64-apple-darwin9.0.0" configures and builds fine but all libraries are 32-bit ("file libLTO.dylib" says "libLTO.dylib: Mach-O dynamically linked shared library i386").

So, how can I build a 64-bit version for OS X? (Unfortunately prebuild executables are not an option for me)

Jan



More information about the llvm-dev mailing list