summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tasks/mruby_build.rake1
-rw-r--r--tasks/mruby_build_commands.rake12
-rw-r--r--travis_config.rb1
3 files changed, 11 insertions, 3 deletions
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
diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake
index b0965ea09..24a77206a 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
@@ -225,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
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