diff options
Diffstat (limited to 'tasks')
| -rw-r--r-- | tasks/mruby_build.rake | 1 | ||||
| -rw-r--r-- | tasks/mruby_build_commands.rake | 12 |
2 files changed, 11 insertions, 2 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 |
