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>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2026-04-15 09:30:33 +09:00
parent d65f7a9c5a
commit 8b44a52176
+1 -1
View File
@@ -1,4 +1,4 @@
MRuby::Build.new do |conf|
MRuby::Build.new('host-cxx') do |conf|
conf.toolchain
# include the default GEMs