[macruby-changes] [4506] MacRuby/trunk/bin/rubyc

source_changes at macosforge.org source_changes at macosforge.org
Fri Sep 10 17:36:32 PDT 2010


Revision: 4506
          http://trac.macosforge.org/projects/ruby/changeset/4506
Author:   lsansonetti at apple.com
Date:     2010-09-10 17:36:29 -0700 (Fri, 10 Sep 2010)
Log Message:
-----------
grab the kernel bitcode from SDK if it exists

Modified Paths:
--------------
    MacRuby/trunk/bin/rubyc

Modified: MacRuby/trunk/bin/rubyc
===================================================================
--- MacRuby/trunk/bin/rubyc	2010-09-10 22:41:36 UTC (rev 4505)
+++ MacRuby/trunk/bin/rubyc	2010-09-11 00:36:29 UTC (rev 4506)
@@ -158,9 +158,18 @@
 
     tmp_objs = []
     @archs.each do |arch|
+      # Locate the kernel bitcode file if needed.
+      env = ''
+      if @sdk
+        kernel_path = File.join(@sdk, "usr/lib/libmacruby-kernel-#{arch}.bc")
+        if File.exist?(kernel_path)
+          env = "/usr/bin/env VM_KERNEL_PATH=\"#{kernel_path}\""
+        end
+      end
+
       # Compile the file into LLVM bitcode.
       bc = gen_tmpfile(base + arch, 'bc')
-      execute("arch -#{arch} #{@macruby} #{@uses_bs_flags} --emit-llvm \"#{bc}\" #{init_func} \"#{path}\"")
+      execute("#{env} arch -#{arch} #{@macruby} #{@uses_bs_flags} --emit-llvm \"#{bc}\" #{init_func} \"#{path}\"")
 
       # Compile the bitcode as assembly.
       asm = gen_tmpfile(base + arch, 's')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100910/71e5c5e0/attachment.html>


More information about the macruby-changes mailing list