Revision: 3527 http://trac.macosforge.org/projects/ruby/changeset/3527 Author: martinlagardette@apple.com Date: 2010-02-15 07:43:22 -0800 (Mon, 15 Feb 2010) Log Message: ----------- - When compiling and no arch was passed, use Xxode ARCHS env var if available - Fixes #579 Modified Paths: -------------- MacRuby/trunk/bin/rubyc Modified: MacRuby/trunk/bin/rubyc =================================================================== --- MacRuby/trunk/bin/rubyc 2010-02-14 08:06:07 UTC (rev 3526) +++ MacRuby/trunk/bin/rubyc 2010-02-15 15:43:22 UTC (rev 3527) @@ -41,7 +41,15 @@ die "Invalid mode `#{@mode}'. Possible choices are: normal, full" end @archs.uniq! - @archs << RUBY_ARCH if @archs.empty? + if @archs.empty? + if not ENV['ARCHS'].empty? + # Copy Xcode way of doing it: + # Use intersection of ARCHS and VALID_ARCHS + @archs = ENV['ARCHS'].split & VALID_ARCHS + else + @archs << RUBY_ARCH + end + end @archs.each do |arch| if not VALID_ARCHS.include?(arch) die "Invalid CPU architecture `#{arch}'. Possible values are: " + VALID_ARCHS.join(", ")