From 7937d64a2163c294b352e5ad643e93dcb9936632 Mon Sep 17 00:00:00 2001 From: Laurent Sansonetti Date: Tue, 22 Sep 2009 18:25:48 +0000 Subject: [PATCH] fix build git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@2608 23306eb0-4c56-4727-a40e-e92c0eb68959 --- bin/rubyc | 3 ++- rakelib/builder.rake | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/rubyc b/bin/rubyc index 7d16858cb..5f83930ce 100644 --- a/bin/rubyc +++ b/bin/rubyc @@ -135,7 +135,8 @@ EOS main = gen_tmpfile('main', 'c') File.open(main, 'w') { |io| io.write(main_txt) } - execute("#{@gcxx} #{main} -dynamic -bundle -undefined suppress -flat_namespace -arch x86_64 -framework MacRuby #{obj} -o #{output}") + link = @internal ? "-L. -lmacruby" : "-framework MacRuby" + execute("#{@gcxx} #{main} -dynamic -bundle -undefined suppress -flat_namespace -arch x86_64 #{link} #{obj} -o #{output}") end def compile_executable(objs, output) diff --git a/rakelib/builder.rake b/rakelib/builder.rake index dce9580d4..6dbaee9ef 100644 --- a/rakelib/builder.rake +++ b/rakelib/builder.rake @@ -348,7 +348,7 @@ end AOT_STDLIB = ['rbconfig.rb', 'lib/irb.rb', 'lib/irb/**/*.rb', 'lib/fileutils.rb'] desc "AOT compile parts of the stdlib" -task :aot_compile_stdlib => [:miniruby] do +task :aot_compile_stdlib => [:miniruby, 'macruby:dylib'] do AOT_STDLIB.each do |pat| Dir.glob(pat).each do |path| out = File.join(File.dirname(path), File.basename(path, '.rb') + '.rbo')