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, #enable_bintest, #enable_test, #exts, #file_separator, #gem_clone_dir, #gem_dir_to_repo_url, #gems, #libmruby_objs, #name, #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, #build_mrbtest_lib_only, #build_mrbtest_lib_only?, #compile_as_cxx, #compilers, #cxx_abi_enabled?, #cxx_exception_enabled?, #debug_enabled?, #define_rules, #disable_cxx_exception, #disable_lock, #enable_cxx_abi, #enable_cxx_exception, #enable_debug, #exefile, #filename, #libfile, #libmruby_core_static, #libmruby_static, #libraries, #lock_enabled?, #locks, #objfile, #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.
371 372 373 374 375 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build.rb', line 371 def initialize(name, build_dir=nil, &block) @endian = nil @test_runner = Command::CrossTestRunner.new(self) super 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
369 370 371 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build.rb', line 369 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
369 370 371 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build.rb', line 369 def host_target @host_target end |
Instance Method Details
#mrbcfile ⇒ Object
377 378 379 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build.rb', line 377 def mrbcfile MRuby.targets['host'].exefile("#{MRuby.targets['host'].build_dir}/bin/mrbc") end |
#run_test ⇒ Object
381 382 383 384 385 386 387 388 389 390 |
# File 'ext/enterprise_script_service/mruby/lib/mruby/build.rb', line 381 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 |