mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
8b44a52176
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>
13 lines
243 B
Ruby
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
|