Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Include compiler archive in list of files managed by 'dev:setup'

  • Loading branch information...
commit be1a8edece20832a0e5d373ddbd91d9345cdf158 1 parent edc8bbd
@wilson wilson authored
View
7 Rakefile
@@ -24,6 +24,7 @@ end
@pp = "runtime/pristine_platform.rba"
@pc = "runtime/pristine_core.rba"
@pl = "runtime/pristine_loader.rbc"
+@pr = "runtime/pristine_compiler.rba"
if File.exists?(@pb)
puts "Using #{@pb} for bootstrap."
@@ -45,6 +46,11 @@ if File.exists?(@pp)
ENV['PLATFORM'] = @pp
end
+if File.exists?(@pr)
+ puts "Using #{@pr} for the compiler."
+ ENV['COMPILER'] = @pr
+end
+
@compiler = ENV['COMPILER']
def source_name(compiled)
@@ -306,6 +312,7 @@ namespace :dev do
sh "cp runtime/bootstrap.rba #{@pb}"
sh "cp runtime/platform.rba #{@pp}"
sh "cp runtime/loader.rbc #{@pl}"
+ sh "cp runtime/compiler.rba #{@pr}"
end
end
View
6 kernel/loader.rb
@@ -27,8 +27,10 @@
# Setup a few changes to the include path.
-# If there is a closer compiler, use it. Otherwise, use the system one.
-unless File.exists? "runtime/compiler.rba"
+# If there is no compiler.rba or COMPILER env variable, use the system one.
+if ENV["COMPILER"] and File.exists? ENV["COMPILER"] then
+ $:.unshift ENV["COMPILER"]
+elsif not File.exists? "runtime/compiler.rba"
$:.unshift "#{Rubinius::RBA_PATH}/compiler.rba"
end
View
BIN  runtime/loader.rbc
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.