Class: MRuby::CrossBuild
- Defined in:
- ext/enterprise_script_service/mruby/lib/mruby/build.rb
Overview
Build
Constant Summary
Constants inherited from Build
Build::COMMANDS, Build::COMPILERS
Instance Attribute Summary collapse
-
#build_target ⇒ Object
cross compiling targets for building native extensions.
-
#host_target ⇒ Object
cross compiling targets for building native extensions.
Attributes inherited from Build
#bins, #build_dir, #exts, #file_separator, #gem_clone_dir, #gem_dir_to_repo_url, #gems, #libmruby_core_objs, #libmruby_objs, #mrbc_build, #name, #presym, #products, #toolchains
Instance Method Summary collapse
-
#initialize(name, build_dir = nil, &block) ⇒ CrossBuild
constructor
A new instance of CrossBuild.
- #mrbcfile ⇒ Object
- #run_test ⇒ Object
Methods inherited from Build
#bintest_enabled?, #build_mrbc_exec, #build_mrbtest_lib_only, #build_mrbtest_lib_only?, #compile_as_cxx, #compilers, #cxx_abi_enabled?, #cxx_exception_enabled?, #debug_enabled?, #define_installer, #define_installer_if_needed, #define_rules, #disable_cxx_exception, #disable_libmruby, #disable_lock, #disable_presym, #enable_bintest, #enable_cxx_abi, #enable_cxx_exception, #enable_debug, #enable_test, #exefile, #filename, #host?, install_dir, #internal?, #libfile, #libmruby_core_static, #libmruby_enabled?, #libmruby_static, #libraries, #lock_enabled?, #locks, #mrbcfile=, #mrbcfile_external?, mruby_config_path, #objfile, #presym_enabled?, #primary_toolchain, #print_build_summary, #root, #run_bintest, #test_enabled?, #toolchain, #verbose_flag
Methods included from LoadGems
#enable_gems?, #gem, #gembox, #load_special_path_gem
Constructor Details
#initialize(name, build_dir = nil, &block) ⇒ CrossBuild
Returns a new instance of CrossBuild.
513 514 515 516 517 518 519 520 521 522 523 524 525 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build.rb', line 513 def initialize(name, build_dir=nil, &block) @test_runner = Command::CrossTestRunner.new(self) super unless mrbcfile_external? || MRuby.targets['host'] # add minimal 'host' MRuby::Build.new('host') do |conf| conf.toolchain conf.build_mrbc_exec conf.disable_libmruby conf.disable_presym end end end |
Instance Attribute Details
#build_target ⇒ Object
cross compiling targets for building native extensions. host - arch of where the built binary will run build - arch of the machine building the binary
511 512 513 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build.rb', line 511 def build_target @build_target end |
#host_target ⇒ Object
cross compiling targets for building native extensions. host - arch of where the built binary will run build - arch of the machine building the binary
511 512 513 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build.rb', line 511 def host_target @host_target end |
Instance Method Details
#mrbcfile ⇒ Object
527 528 529 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build.rb', line 527 def mrbcfile mrbcfile_external? ? super : MRuby::targets['host'].mrbcfile end |
#run_test ⇒ Object
531 532 533 534 535 536 537 538 539 540 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build.rb', line 531 def run_test @test_runner. << verbose_flag mrbtest = exefile("#{build_dir}/bin/mrbtest") if (@test_runner.command == nil) puts "You should run #{mrbtest} on target device." puts else @test_runner.run(mrbtest) end end |