Files
Yukihiro "Matz" Matsumoto 8b44a52176 host-cxx: use distinct build directory from host-debug
build_config/host-cxx.rb defaulted to MRuby::Build.new (no name),
which is equivalent to MRuby::Build.new('host'), so it shared
build/host/ with build_config/host-debug.rb.

The two configs produce ABI-incompatible object files (C linkage
vs. C++-mangled).  Switching between configs without a clean step
silently mixes stale objects, leading to confusing undefined
reference errors at link time.

Name the C++ build 'host-cxx' so it gets its own build/host-cxx/
directory.  No external paths reference build/host/ in a way that
this change would break.

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-15 09:30:33 +09:00

13 lines
243 B
Ruby

MRuby::Build.new('host-cxx') do |conf|
conf.toolchain
# include the default GEMs
conf.gembox 'default'
# C compiler settings
conf.cc.defines = %w(MRB_USE_DEBUG_HOOK)
conf.enable_debug
conf.enable_cxx_abi
conf.enable_test
end