mirror of
https://github.com/nesbox/TIC-80.git
synced 2026-04-18 22:42:27 +00:00
* Register submodule for mruby * Link binaries against static mruby * Adapt old mrb_api.c code to current internal API-s * Create Ruby demos * Mention Ruby support in README.md * Mention Ruby in features * Attribution * Fix broken demos * Add mruby WASM target * Fix compatibility with old CMake versions * Fix support for languages with single-char comment Current behavior assumes that comments comprise exactly two characters, such as "--" or "//". Many languages, such as Ruby and Python, use a single character, such as the pound sign or the ASCII quotation mark to signal a single-line comment. * Fix segfault when opening outline * Actions: Install Ruby where not present * Honor Windows MRuby static exts * Build mruby with /MT on Windows * Force mruby to use .a suffix for static libraries Github Actions seems to also prefer the UNIX-native prefix on Windows CMake * Do not build redundant mrbgems Created a gembox containing only useful gems * Infer mruby CFLAGS from CMake * Pass CMake flags to MRuby cross target * Revert "Pass CMake flags to MRuby cross target" This reverts commit1a8bf8330e. It turns out that wrapping CMake's poor cross build support was not a good idea after all. * Refactor mruby build configuration sets * mruby toolchain switching from CMake * Guess CMAKE_COMMAND on Windows OS * [mruby] Delegate ENV passing to rake invocation CMake's env helper is broken on Windows OS :/ * Enforce certain mruby toolchains from CMake side * Simplify mruby build system * Genericize cross compilation * Clean mruby build artifacts with make/ninja clean * Force mruby bootstrap to use MSVC where applicable * Fix naming in demos.c * Fix incorrect mruby x-compilation logic * Use TARGET_CC as the ultimate linker in mruby builds Some toolchains seem to work better this way. * Explicitly use mruby clang toolchain on macOS * Set --sysroot in mruby for macOS Clang * Do not depend on YACC https://github.com/nesbox/TIC-80/pull/1726#issuecomment-989728667: > mruby can be built without yacc(or GNU Bison) after mruby 2.1.2+( https://mruby.org/releases/2020/08/06/mruby-2.1.2-released.html). * Set ImageOS in Actions runner Dockerfiles This allows Ruby to be installed on those non-standard images. * Revert "Set ImageOS in Actions runner Dockerfiles" This reverts commit0ea4ecaf83. * Manually install Ruby in cross Actions containers * mruby Android toolchain * Additional params for mruby android toolchain * Don't build redundant mrbgems * Whitelist mrbgem "stdlib-io" anyway * Don't fortify sources on Android * Disable source fortification project-wide on Android * Also disable fortify at link time on Android * Android build fixes * Fix building on Raspberry Pi * Fix missing variable prefix in Android CMake * Rename: mrb.c -> mruby.c * Adapt mruby.c code to master * Fix silly misplacement of definition in CMakeLists * Use CMake-native target version inference ref. https://cmake.org/cmake/help/latest/variable/CMAKE_ANDROID_API.html * Do not link mruby against winsock on WinNT * Add mruby target to stub export action * Revert "Use CMake-native target version inference" This reverts commit6164e0b052. * Explicitly set ANDROID_API from gradle * Move: /mruby/ -> /build/mruby/ More consistent with the rest of the project tree * baremetalpi: Link against libmruby * Prepare standalone NDK toolchains in Actions * Link sysroot in standalone NDK * Patch mruby with modern NDK support * Actions: Provision Git to allow "am" patching * Revert "Actions: Provision Git to allow "am" patching" This reverts commit375ca376f2. * Patch mruby during the configuration step * Github Actions: Recreate standalone NDK toolchains * Fix mruby build on Android * Update build instructions
44 lines
1.0 KiB
Ruby
44 lines
1.0 KiB
Ruby
MRuby::Build.new do |conf|
|
|
if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
|
|
toolchain :visualcpp
|
|
else
|
|
conf.toolchain
|
|
end
|
|
|
|
conf.build_mrbc_exec
|
|
conf.disable_libmruby
|
|
conf.disable_presym
|
|
end
|
|
|
|
MRuby::CrossBuild.new('target') do |conf|
|
|
toolchain ENV['MRUBY_TOOLCHAIN']
|
|
|
|
conf.gembox File.expand_path('tic', File.dirname(__FILE__))
|
|
|
|
conf.cc do |cc|
|
|
cc.command = ENV["TARGET_CC"] || 'cc'
|
|
cc.flags = [ENV["TARGET_CFLAGS"] || %w()]
|
|
cc.flags << '-fPIC' unless ENV['MRUBY_TOOLCHAIN'] == 'visualcpp'
|
|
cc.flags << "-isysroot #{ENV['MRUBY_SYSROOT']}" unless ENV['MRUBY_SYSROOT'].empty?
|
|
end
|
|
|
|
conf.linker do |linker|
|
|
linker.command = ENV['TARGET_CC'] || 'cc'
|
|
linker.flags = [ENV['TARGET_LDFLAGS'] || %w()]
|
|
end
|
|
|
|
conf.archiver do |archiver|
|
|
archiver.command = ENV['TARGET_AR'] || 'ar'
|
|
end
|
|
|
|
conf.exts do |exts|
|
|
exts.object = '.o'
|
|
exts.library = '.a'
|
|
# exts.executable = '' # '.exe' if Windows
|
|
end
|
|
|
|
conf.enable_debug if /DEBUG/ =~ ENV["BUILD_TYPE"]
|
|
conf.enable_bintest
|
|
conf.enable_test
|
|
end
|