From 8b44a5217677e7dace83acc8393d165657b05fb4 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 15 Apr 2026 09:30:33 +0900 Subject: [PATCH] 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 --- build_config/host-cxx.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_config/host-cxx.rb b/build_config/host-cxx.rb index 15cb0c347..5dc37edd0 100644 --- a/build_config/host-cxx.rb +++ b/build_config/host-cxx.rb @@ -1,4 +1,4 @@ -MRuby::Build.new do |conf| +MRuby::Build.new('host-cxx') do |conf| conf.toolchain # include the default GEMs