[4154] MacRuby/trunk/rakelib/builder/options.rb
Revision: 4154 http://trac.macosforge.org/projects/ruby/changeset/4154 Author: lsansonetti@apple.com Date: 2010-05-25 18:15:56 -0700 (Tue, 25 May 2010) Log Message: ----------- rake now accepts optional CC and CXX variable to setup custom compilers Modified Paths: -------------- MacRuby/trunk/rakelib/builder/options.rb Modified: MacRuby/trunk/rakelib/builder/options.rb =================================================================== --- MacRuby/trunk/rakelib/builder/options.rb 2010-05-26 00:28:19 UTC (rev 4153) +++ MacRuby/trunk/rakelib/builder/options.rb 2010-05-26 01:15:56 UTC (rev 4154) @@ -36,19 +36,31 @@ #ENV['LLVM_PRE_TOT'] = '1' end -RUBY_INSTALL_NAME = b.option('ruby_install_name', 'macruby') -RUBY_SO_NAME = b.option('ruby_so_name', RUBY_INSTALL_NAME) -LLVM_PATH = b.option('llvm_path', llvm_default_path) -FRAMEWORK_NAME = b.option('framework_name', 'MacRuby') -FRAMEWORK_INSTDIR = b.option('framework_instdir', '/Library/Frameworks') -SYM_INSTDIR = b.option('sym_instdir', '/usr/local') -NO_WARN_BUILD = !b.option('allow_build_warnings', false) -ENABLE_STATIC_LIBRARY = b.option('enable_static_library', 'no') { 'yes' } -ENABLE_DEBUG_LOGGING = b.option('enable_debug_logging', true) { |x| x == 'true' } -SIMULTANEOUS_JOBS = b.option('jobs', 1) { |x| x.to_i } -COMPILE_STDLIB = b.option('compile_stdlib', true) { |x| x == 'true' } -OPTZ_LEVEL = b.option('optz_level', 3) { |x| x.to_i } +RUBY_INSTALL_NAME = b.option('ruby_install_name', 'macruby') +RUBY_SO_NAME = b.option('ruby_so_name', RUBY_INSTALL_NAME) +LLVM_PATH = b.option('llvm_path', llvm_default_path) +FRAMEWORK_NAME = b.option('framework_name', 'MacRuby') +FRAMEWORK_INSTDIR = b.option('framework_instdir', '/Library/Frameworks') +SYM_INSTDIR = b.option('sym_instdir', '/usr/local') +NO_WARN_BUILD = !b.option('allow_build_warnings', false) +ENABLE_STATIC_LIBRARY = b.option('enable_static_library', 'no') { 'yes' } +ENABLE_DEBUG_LOGGING = b.option('enable_debug_logging', true) { |x| x == 'true' } +SIMULTANEOUS_JOBS = b.option('jobs', 1) { |x| x.to_i } +COMPILE_STDLIB = b.option('compile_stdlib', true) { |x| x == 'true' } +OPTZ_LEVEL = b.option('optz_level', 3) { |x| x.to_i } +default_CC = '/usr/bin/gcc-4.2' +unless File.exist?(default_CC) + default_CC = '/usr/bin/gcc' +end +CC = b.option('CC', default_CC) + +default_CXX = '/usr/bin/g++-4.2' +unless File.exist?(default_CXX) + default_CXX = '/usr/bin/g++' +end +CXX = b.option('CXX', default_CXX) + # Everything below this comment should *not* be modified. if ENV['build_as_embeddable'] @@ -108,8 +120,6 @@ LLVM_MODULES = "core jit nativecodegen bitwriter bitreader" EXPORTED_SYMBOLS_LIST = "./exported_symbols_list" -CC = '/usr/bin/gcc-4.2' -CXX = '/usr/bin/g++-4.2' OPTZFLAG = "-O#{OPTZ_LEVEL}" CFLAGS = "-I. -I./include -I/usr/include/libxml2 #{ARCHFLAGS} -fno-common -pipe -g -Wall -fexceptions #{OPTZFLAG}" CFLAGS << " -Wno-deprecated-declarations -Werror" if NO_WARN_BUILD
participants (1)
-
source_changes@macosforge.org