[MacRuby-devel] quick question about macrubyc static

Laurent Sansonetti lsansonetti at apple.com
Thu Oct 21 14:51:42 PDT 2010


Hi Iain,

--static activates static compilation, an experimental feature of the MacRuby compiler. It is very different from regular compilation.

A binary generated by static compilation will statically link against a special version of MacRuby, which does not make use of the LLVM JIT compiler. Since the binary won't make use of the JIT, some features of Ruby are disabled. Also, BridgeSupport annotations are directly compiled into the binary and won't be read at runtime.

The goal of static compilation is to generate smaller executables (generally just a couple MBs) that can run on situations where JIT compilation is not an option. Because the executable embeds the runtime itself, there is no need to bundle the MacRuby framework in the app bundle. It's currently a work in progress though, so it's not recommended for general use.

Laurent

On Oct 20, 2010, at 8:06 AM, Iain Barnett wrote:

> Hi,
> 
> If I compile a ruby script with `macrubyc --static` is that essentially the same as compiling ruby from within an Xcode project or is there a real difference in what is produced?
> 
> 
> Regards,
> Iain
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20101021/5926e412/attachment-0001.html>


More information about the MacRuby-devel mailing list