diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-08-16 17:56:50 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 16:21:40 +0900 |
| commit | 1520c97e172484af7cbd0f51512cd3ac0025e228 (patch) | |
| tree | 9f54c511eefa4b0f1371b36d8036c53c7f0ff961 /lib | |
| parent | 8a87549315d0c7fd984a8ad239ebe3dbab4d2855 (diff) | |
| download | mruby-1520c97e172484af7cbd0f51512cd3ac0025e228.tar.gz mruby-1520c97e172484af7cbd0f51512cd3ac0025e228.zip | |
Add default `host` target for cross compiling.
You don't have to define explicit `host` build target any more.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/mruby/build.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/mruby/build.rb b/lib/mruby/build.rb index 40fd0f9fe..c101a237f 100644 --- a/lib/mruby/build.rb +++ b/lib/mruby/build.rb @@ -370,6 +370,17 @@ EOS attr_accessor :host_target, :build_target def initialize(name, build_dir=nil, &block) + unless MRuby.targets['host'] + # add minimal 'host' + MRuby::Build.new('host') do |conf| + if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR'] + toolchain :visualcpp + else + toolchain :gcc + end + conf.gem :core => 'mruby-bin-mrbc' + end + end @endian = nil @test_runner = Command::CrossTestRunner.new(self) super |
