Skip to content

Commit

Permalink
Remove precompiling to .rbc on install and gem install.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Ford committed Aug 31, 2011
1 parent 4c1e675 commit 46b8364
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 44 deletions.
26 changes: 0 additions & 26 deletions lib/rubygems/defaults/rbx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,6 @@

module Gem

def self.precompile_install(installer)
spec = installer.spec
dir = File.join(installer.gem_home, "gems", spec.full_name)

files = Dir["#{dir}/**/*.rb"]

if Gem.configuration.really_verbose
STDERR.puts " rbx: Precompiling #{files.size} files..."
end

error = 0
files.each do |file|
begin
Rubinius.compile_file file
rescue Rubinius::CompileError, SyntaxError, LoadError
error += 1
end
end

if Gem.configuration.really_verbose and error > 0
STDERR.puts " rbx: #{error} error(s) precompiling."
end
end

@post_install_hooks << method(:precompile_install)

def self.default_bindir
File.join Rubinius::GEMS_PATH, "bin"
end
Expand Down
19 changes: 1 addition & 18 deletions rakelib/install.rake
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ def need_install?
File.expand_path(Dir.pwd) != install_dir(BUILD_CONFIG[:libdir])
end

def precompile(dir)
(Dir["#{dir}/*.rb"] + Dir["#{dir}/**/*.rb"]).each do |file|
Rubinius::Compiler.compile file, "#{file}c", 1, [:default]
end
end

def install_file(source, pattern, dest)
return if File.directory? source

Expand All @@ -68,20 +62,9 @@ def install_file(source, pattern, dest)
end

desc "Install Rubinius"
task :install => %w[ build install:build install:files ]
task :install => %w[ build install:files ]

namespace :install do
desc "Compile all lib Ruby files"
task :build do
if need_install?
puts "Compiling library files for install..."
precompile "lib"

puts "Compiling pre-installed gem files for install..."
precompile "preinstalled-gems/rubinius/0.13/gems"
end
end

desc "Install all the Rubinius files"
task :files do
if need_sudo? install_dirs
Expand Down

0 comments on commit 46b8364

Please sign in to comment.