Revision: 3068 http://trac.macosforge.org/projects/ruby/changeset/3068 Author: lsansonetti@apple.com Date: 2009-11-30 19:25:59 -0800 (Mon, 30 Nov 2009) Log Message: ----------- introduced LLVM_PATH as a rake argument and rbconfig setting, changed macrubyc to use it to locate llc Modified Paths: -------------- MacRuby/trunk/bin/rubyc MacRuby/trunk/rakelib/builder.rake MacRuby/trunk/rakelib/builder.rb Modified: MacRuby/trunk/bin/rubyc =================================================================== --- MacRuby/trunk/bin/rubyc 2009-12-01 03:06:24 UTC (rev 3067) +++ MacRuby/trunk/bin/rubyc 2009-12-01 03:25:59 UTC (rev 3068) @@ -52,7 +52,12 @@ # Locate necessary programs. @macruby = locate(@internal ? './miniruby' : 'macruby') - @llc = locate('llc', !@internal) + if @internal + @llc = File.join(RbConfig::CONFIG['LLVM_PATH'], 'bin/llc') + die "llc not found as #{@llc}" unless File.exist?(@llc) + else + @llc = locate('llc', true) + end @gcc = locate('gcc') @gcxx = locate('g++') @nm = locate('nm') Modified: MacRuby/trunk/rakelib/builder.rake =================================================================== --- MacRuby/trunk/rakelib/builder.rake 2009-12-01 03:06:24 UTC (rev 3067) +++ MacRuby/trunk/rakelib/builder.rake 2009-12-01 03:25:59 UTC (rev 3068) @@ -249,6 +249,7 @@ CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)" CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)" CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)" + CONFIG["LLVM_PATH"] = "#{LLVM_PATH}" CONFIG["topdir"] = File.dirname(__FILE__) MAKEFILE_CONFIG = {} CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup} Modified: MacRuby/trunk/rakelib/builder.rb =================================================================== --- MacRuby/trunk/rakelib/builder.rb 2009-12-01 03:06:24 UTC (rev 3067) +++ MacRuby/trunk/rakelib/builder.rb 2009-12-01 03:25:59 UTC (rev 3068) @@ -28,7 +28,7 @@ else do_option('archs', `arch`.include?('ppc') ? 'ppc' : %w{i386 x86_64}) { |x| x.split(',') } end -LLVM_CONFIG = do_option('llvm_config', '/usr/local/bin/llvm-config') +LLVM_PATH = do_option('llvm_path', '/usr/local') FRAMEWORK_NAME = do_option('framework_name', 'MacRuby') FRAMEWORK_INSTDIR = do_option('framework_instdir', '/Library/Frameworks') SYM_INSTDIR = do_option('sym_instdir', '/usr/local') @@ -54,6 +54,7 @@ $stderr.puts "You appear to be using a PowerPC machine. MacRuby's primary architectures are Intel 32-bit and 64-bit (i386 and x86_64). Consequently, PowerPC support may be lacking some features." end +LLVM_CONFIG = File.join(LLVM_PATH, 'bin/llvm-config') unless File.exist?(LLVM_CONFIG) $stderr.puts "The llvm-config executable was not located as #{LLVM_CONFIG}. Please make sure LLVM is correctly installed on your machine and pass the llvm_config option to rake if necessary." exit 1
participants (1)
-
source_changes@macosforge.org