Permalink
Browse files

Fixed package:llvm task, remove unused misleading compile_c.

  • Loading branch information...
Brian Ford
Brian Ford committed Apr 29, 2011
1 parent de0a27b commit 53969acf19906dc8dca7fd2b430230841f0b5289
Showing with 2 additions and 37 deletions.
  1. +1 −0 Rakefile
  2. +1 −1 rakelib/build.rb
  3. +0 −36 rakelib/vm.rake
View
@@ -86,6 +86,7 @@ ENV['CC'] = BUILD_CONFIG[:cc] unless ENV['CC']
ENV['CXX'] = BUILD_CONFIG[:cxx] unless ENV['CXX']
$dlext = RbConfig::CONFIG["DLEXT"]
+$CC = ENV['CC']
task :default => %w[build vm:test] do
unless File.directory? BUILD_CONFIG[:runtime]
View
@@ -52,7 +52,7 @@ def host_triple
end
def gcc_major_version
- `#{CC} -dumpversion`.strip.split(".")[0,2].join(".")
+ `#{$CC} -dumpversion`.strip.split(".")[0,2].join(".")
end
def llvm_config_flags
View
@@ -300,39 +300,3 @@ namespace :vm do
puts missing.join("\n")
end
end
-
-############################################################$
-# Importers & Methods:
-
-def compile_c(obj, src, output_kind="c")
- flags = llvm_flags + INCLUDES + FLAGS
-
- if CONFIG.compile_with_llvm
- flags << "-emit-llvm"
- end
-
- # GROSS
- if src == "vm/test/runner.cpp"
- flags.delete_if { |f| /-O.*/.match(f) }
- end
-
- flags = flags.join(" ")
-
- # Now include CFLAGS and CXXFLAGS
- if str = ENV['CXXFLAGS']
- flags << " #{str}"
- elsif str = ENV['CFLAGS']
- flags << " #{str}"
- end
-
- # Make sure we are C99 compatible.
- flags << " -D__STDC_LIMIT_MACROS" unless flags =~ /__STDC_LIMIT_MACROS/
-
- if $verbose
- sh "#{CC} #{flags} -#{output_kind} -o #{obj} #{src} 2>&1"
- else
- puts "CC #{src}"
- sh "#{CC} #{flags} -#{output_kind} -o #{obj} #{src} 2>&1", :verbose => false
- end
-end
-

0 comments on commit 53969ac

Please sign in to comment.