Skip to content

Instantly share code, notes, and snippets.

@kyab
Forked from Watson1978/gist:1062455
Created July 8, 2011 15:22
Show Gist options
  • Save kyab/1072070 to your computer and use it in GitHub Desktop.
Save kyab/1072070 to your computer and use it in GitHub Desktop.
MacRuby : Build UniversalBinary

Build LLVM 2.9

$ svn co https://llvm.org/svn/llvm-project/llvm/branches/release_29@127367 llvm-2.9
$ cd llvm-2.9
$ env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc CXX=/usr/bin/g++ ./configure --enable-bindings=none --enable-optimized --with-llvmgccdir=/tmp
$ env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc CXX=/usr/bin/g++ make 
$ sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc CXX=/usr/bin/g++ make install

Build MacRuby

$ git clone git://github.com/MacRuby/MacRuby.git
$ cd MacRuby
$ rake RC_ARCHS="i386 x86_64" jobs=2
$ sudo rake install

$ file /usr/local/bin/macruby
/usr/local/bin/macruby: Mach-O universal binary with 2 architectures
/usr/local/bin/macruby (for architecture i386):	Mach-O executable i386
/usr/local/bin/macruby (for architecture x86_64):	Mach-O 64-bit executable x86_64

$ arch -i386 macruby -v
MacRuby 0.11 (ruby 1.9.2) [universal-darwin10.0, i386]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment