From 9968af45709da34d923569cd7b2329e11416c8b8 Mon Sep 17 00:00:00 2001 From: take_cheeze Date: Sun, 2 Mar 2014 04:26:33 +0900 Subject: allow command like "ccache gcc" --- tasks/mruby_build_commands.rake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake index b0965ea09..10cc215dc 100644 --- a/tasks/mruby_build_commands.rake +++ b/tasks/mruby_build_commands.rake @@ -24,9 +24,17 @@ module MRuby target end + NotFoundCommands = {} + private def _run(options, params={}) - sh build.filename(command) + ' ' + ( options % params ) + return sh command + ' ' + ( options % params ) if NotFoundCommands.key? @command + begin + sh build.filename(command) + ' ' + ( options % params ) + rescue RuntimeError + NotFoundCommands[@command] = true + _run options, params + end end end -- cgit v1.2.3 From 6de1c22d9954ba4282aac6e4efa4b491626d4565 Mon Sep 17 00:00:00 2001 From: take_cheeze Date: Sun, 2 Mar 2014 04:30:06 +0900 Subject: use c++ compiler to link when c++ abi is enabled --- tasks/mruby_build.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/mruby_build.rake b/tasks/mruby_build.rake index 3c0a67179..c65ad4c20 100644 --- a/tasks/mruby_build.rake +++ b/tasks/mruby_build.rake @@ -102,6 +102,7 @@ module MRuby def enable_cxx_abi return if @cxx_abi_enabled compilers.each { |c| c.defines += %w(MRB_ENABLE_CXX_EXCEPTION) } + linker.command = cxx.command @cxx_abi_enabled = true end -- cgit v1.2.3 From 600c17ec081e53cf490d5f6895a6e16186946751 Mon Sep 17 00:00:00 2001 From: take_cheeze Date: Sun, 2 Mar 2014 04:33:23 +0900 Subject: use shallow clone in git gem --- tasks/mruby_build_commands.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake index 10cc215dc..24a77206a 100644 --- a/tasks/mruby_build_commands.rake +++ b/tasks/mruby_build_commands.rake @@ -233,7 +233,7 @@ module MRuby def initialize(build) super @command = 'git' - @flags = [] + @flags = %w[--depth 1] @clone_options = "clone %{flags} %{url} %{dir}" @pull_options = "pull" end -- cgit v1.2.3 From 2543b712a3983137040dd660a5cb65be4f8a467b Mon Sep 17 00:00:00 2001 From: take_cheeze Date: Sun, 2 Mar 2014 05:04:00 +0900 Subject: remove explicit use of g++ --- travis_config.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/travis_config.rb b/travis_config.rb index e29a066ec..4c9e623fe 100644 --- a/travis_config.rb +++ b/travis_config.rb @@ -32,6 +32,5 @@ MRuby::Build.new('cxx_abi') do |conf| end conf.enable_bintest = true - conf.linker.command = 'g++' enable_cxx_abi end -- cgit v1.2.3