mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Add default host target for cross compiling.
You don't have to define explicit `host` build target any more.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,19 +1,3 @@
|
||||
MRuby::Build.new do |conf|
|
||||
|
||||
# Gets set by the VS command prompts.
|
||||
if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
|
||||
toolchain :visualcpp
|
||||
else
|
||||
toolchain :gcc
|
||||
end
|
||||
|
||||
enable_debug
|
||||
|
||||
# include the default GEMs
|
||||
conf.gembox 'default'
|
||||
|
||||
end
|
||||
|
||||
# Cross Compiling configuration for Arduino Due
|
||||
# http://arduino.cc/en/Main/ArduinoBoardDue
|
||||
#
|
||||
|
||||
@@ -1,20 +1,3 @@
|
||||
MRuby::Build.new do |conf|
|
||||
|
||||
# Gets set by the VS command prompts.
|
||||
if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
|
||||
toolchain :visualcpp
|
||||
else
|
||||
toolchain :gcc
|
||||
end
|
||||
|
||||
enable_debug
|
||||
|
||||
# include the default GEMs
|
||||
conf.gembox 'default'
|
||||
|
||||
end
|
||||
|
||||
|
||||
# Cross Compiling configuration for Intel Galileo on Arduino environment
|
||||
# http://arduino.cc/en/ArduinoCertified/IntelGalileo
|
||||
#
|
||||
|
||||
@@ -1,19 +1,3 @@
|
||||
MRuby::Build.new do |conf|
|
||||
|
||||
# Gets set by the VS command prompts.
|
||||
if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
|
||||
toolchain :visualcpp
|
||||
else
|
||||
toolchain :gcc
|
||||
end
|
||||
|
||||
enable_debug
|
||||
|
||||
# include the default GEMs
|
||||
conf.gembox 'default'
|
||||
|
||||
end
|
||||
|
||||
# Cross Compiling configuration for RX630
|
||||
# http://gadget.renesas.com/
|
||||
#
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
MRuby::Build.new do |conf|
|
||||
|
||||
# Gets set by the VS command prompts.
|
||||
if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
|
||||
toolchain :visualcpp
|
||||
else
|
||||
toolchain :gcc
|
||||
end
|
||||
|
||||
enable_debug
|
||||
|
||||
# include the default GEMs
|
||||
conf.gembox 'default'
|
||||
end
|
||||
|
||||
# Requires Android NDK r13 or later.
|
||||
MRuby::CrossBuild.new('android-arm64-v8a') do |conf|
|
||||
params = {
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
MRuby::Build.new do |conf|
|
||||
|
||||
# Gets set by the VS command prompts.
|
||||
if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
|
||||
toolchain :visualcpp
|
||||
else
|
||||
toolchain :gcc
|
||||
end
|
||||
|
||||
enable_debug
|
||||
|
||||
# include the default GEMs
|
||||
conf.gembox 'default'
|
||||
end
|
||||
|
||||
# Requires Android NDK r13 or later.
|
||||
MRuby::CrossBuild.new('android-armeabi') do |conf|
|
||||
params = {
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
MRuby::Build.new do |conf|
|
||||
|
||||
# Gets set by the VS command prompts.
|
||||
if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
|
||||
toolchain :visualcpp
|
||||
else
|
||||
toolchain :gcc
|
||||
end
|
||||
|
||||
enable_debug
|
||||
|
||||
# include the default GEMs
|
||||
conf.gembox 'default'
|
||||
end
|
||||
|
||||
# Requires Android NDK r13 or later.
|
||||
MRuby::CrossBuild.new('android-armeabi-v7a-neon-hard') do |conf|
|
||||
params = {
|
||||
|
||||
@@ -1,19 +1,3 @@
|
||||
MRuby::Build.new do |conf|
|
||||
|
||||
# Gets set by the VS command prompts.
|
||||
if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
|
||||
toolchain :visualcpp
|
||||
else
|
||||
toolchain :gcc
|
||||
end
|
||||
|
||||
enable_debug
|
||||
|
||||
# include the default GEMs
|
||||
conf.gembox 'default'
|
||||
|
||||
end
|
||||
|
||||
# Cross Compiling configuration for Digilent chipKIT Max32
|
||||
# http://www.digilentinc.com/Products/Detail.cfm?Prod=CHIPKIT-MAX32
|
||||
#
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
# Define cross build settings
|
||||
MRuby::CrossBuild.new('32bit') do |conf|
|
||||
MRuby::CrossBuild.new('cross-32bit') do |conf|
|
||||
toolchain :gcc
|
||||
|
||||
conf.cc.flags << "-m32"
|
||||
conf.linker.flags << "-m32"
|
||||
|
||||
conf.build_mrbtest_lib_only
|
||||
# conf.build_mrbtest_lib_only
|
||||
|
||||
conf.gem 'examples/mrbgems/c_and_ruby_extension_example'
|
||||
conf.gem :core => "mruby-bin-mruby"
|
||||
conf.gem "#{MRUBY_ROOT}/examples/mrbgems/c_and_ruby_extension_example"
|
||||
|
||||
conf.test_runner.command = 'env'
|
||||
end
|
||||
|
||||
@@ -1,17 +1,3 @@
|
||||
MRuby::Build.new do |conf|
|
||||
# Gets set by the VS command prompts
|
||||
if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
|
||||
toolchain :visualcpp
|
||||
else
|
||||
toolchain :gcc
|
||||
end
|
||||
|
||||
enable_debug
|
||||
|
||||
# Include the default GEMs
|
||||
conf.gembox 'default'
|
||||
end
|
||||
|
||||
# Cross Compiling configuration for the Sega Dreamcast
|
||||
# This configuration requires KallistiOS (KOS)
|
||||
# https://dreamcast.wiki
|
||||
|
||||
Reference in New Issue
Block a user