[macruby-changes] [2584] MacRuby/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Sat Sep 19 15:56:36 PDT 2009
Revision: 2584
http://trac.macosforge.org/projects/ruby/changeset/2584
Author: lsansonetti at apple.com
Date: 2009-09-19 15:56:36 -0700 (Sat, 19 Sep 2009)
Log Message:
-----------
AOT compile rbconfig.rb and irb upon rake install
Modified Paths:
--------------
MacRuby/trunk/bin/rubyc
MacRuby/trunk/instruby.rb
Modified: MacRuby/trunk/bin/rubyc
===================================================================
--- MacRuby/trunk/bin/rubyc 2009-09-19 20:55:05 UTC (rev 2583)
+++ MacRuby/trunk/bin/rubyc 2009-09-19 22:56:36 UTC (rev 2584)
@@ -14,6 +14,7 @@
def initialize(argv)
@mode = :normal
@frameworks = []
+ @internal = argv.delete('--internal')
# Parse arguments.
OptionParser.new do |opts|
@@ -39,14 +40,14 @@
end
# Locate necessary programs.
- @macruby = locate('macruby')
+ @macruby = locate(@internal ? './miniruby' : 'macruby')
@llc = locate('llc')
@gcc = locate('gcc')
@gcxx = locate('g++')
@nm = locate('nm')
# Misc.
- @tmpdir = (ENV['TMPDIR'] or raise 'no TMPDIR?')
+ @tmpdir = (ENV['TMPDIR'] or '/tmp')
@tmpfiles = []
end
Modified: MacRuby/trunk/instruby.rb
===================================================================
--- MacRuby/trunk/instruby.rb 2009-09-19 20:55:05 UTC (rev 2583)
+++ MacRuby/trunk/instruby.rb 2009-09-19 22:56:36 UTC (rev 2584)
@@ -517,6 +517,14 @@
ln_sfh File.join("../../..", CONFIG['bindir'], 'rb_nibtool'), ib_dest
install('tool/rb_nibtool.old', ib_dest, :mode => $prog_mode)
+puts "compiling (parts of) the standard library"
+files = ['universal-darwin*/rbconfig.rb', 'irb.rb', 'irb/**/*.rb']
+files.map { |file| Dir.glob(File.join(with_destdir(rubylibdir), file)) }.flatten.each do |path|
+ line = "./miniruby -I. -I./lib bin/rubyc --internal -C \"#{path}\""
+ $stderr.puts line
+ raise 'AOT compilation failed' unless system(line)
+end
+
end # unless $installing_rdoc
# vi:set sw=2:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090919/782fdcc0/attachment.html>
More information about the macruby-changes
mailing list