build_config: drop the host build from the IntelEdison config - #7247
Conversation
build_config/IntelEdison.rb opened an anonymous `MRuby::Build` ahead of its `CrossBuild`, and an unnamed build is called 'host' (lib/mruby/build.rb:114). The build tree is keyed by that name (:127), so MRUBY_CONFIG=IntelEdison aimed a build carrying `MRB_USE_READLINE` and mruby-hs-regexp at build/host, on top of whatever a default build had left there. The block dates from a27426a (2016), when a cross build took its mrbc from `MRuby.targets['host']` and nowhere else, so every cross config declared a host build to have one. 1520c97 (2020) made that unnecessary and deleted the block from the eight other cross configs of the time; this one, the only one with a comment header above the block rather than the block at line 1, kept it. Nothing here has needed it since: the cross build carries `default.gembox`, and with `mruby-bin-mrbc` in it, `CrossBuild#bind_mrbc_host` generates an mrbc build of its own where the config declares no host (:712). Every other cross config in build_config/ is written that way. Delete the block, as 1520c97 did. On master, run from a clean tree, the config does not get past it: the host build defines `MRB_USE_READLINE`, which mirb has not taken since 527018c, and aborts before the cross target is reached: $ MRUBY_CONFIG=IntelEdison rake -j16 ... CPP mrbgems/mruby-bin-mirb/tools/mirb/mirb_completion.c -> build/host/mrbgems/mruby-bin-mirb/tools/mirb/mirb_completion.pi mrbgems/mruby-bin-mirb/tools/mirb/mirb_completion.c:45:10: error: #include expects "FILENAME" or <FILENAME> 45 | #include MRB_READLINE_HEADER rake aborted! $ ls build/ core2-32-poky-linux host repos Without it, the same run reaches the cross target and stops where a machine without the Edison SDK has to stop, on the cross compiler, and build/host is not created: $ MRUBY_CONFIG=IntelEdison rake -j16 GIT https://github.com/pbosetti/mruby-hs-regexp.git -> build/repos/core2-32-poky-linux/mruby-hs-regexp CPP mrbgems/mruby-bigint/core/bigint.c -> build/core2-32-poky-linux/mrbgems/mruby-bigint/core/bigint.pi sh: 1: /opt/poky-edison/1.7.2/sysroots/i386-pokysdk-darwin/usr/bin/i586-poky-linux/i586-poky-linux-gcc: not found rake aborted! $ ls build/ core2-32-poky-linux repos The mrbc the cross target compiles its Ruby with is the generated one, built with the host gcc into the directory that mechanism names: $ MRUBY_CONFIG=IntelEdison rake -j16 "$PWD/build/mrbc/default/bin/mrbc" ... LD build/mrbc/default/bin/mrbc $ ls build/ core2-32-poky-linux mrbc repos The cross target itself still carries `MRB_USE_READLINE`, and will fail on the same mirb line once the SDK is present; that is the target's own define, out of the scope of removing a host build that duplicated it.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 2 remain after this review. 📝 WalkthroughWalkthroughRemoved the standalone default GCC Changes
Merge Risk: ⚪ Minimal · up to This localized build-configuration change removes an obsolete host build while preserving the cross-target build path; no actionable merge-blocking risk remains after normal checks. Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
build_config/IntelEdison.rbopens an anonymousMRuby::Buildahead of itsCrossBuild, and an unnamed build is calledhost(lib/mruby/build.rb:114). The build tree is keyed by that name (:127), soMRUBY_CONFIG=IntelEdisonaims a build carryingMRB_USE_READLINEand mruby-hs-regexp atbuild/host, on top of whatever a default build has left there. This is the same shape as #7195, #7197, #7199 and #7200, on a config none of them touches, and the last of the cross configs to have it.Where the block comes from
It dates from a27426a (2016), when a cross build took its mrbc from
MRuby.targets['host']and nowhere else, so every cross config declared a host build to have one. 1520c97 (2020) made that unnecessary and deleted the block from the eight other cross configs of the time (ArduinoDue, IntelGalileo, RX630, three android configs, chipKITMax32, dreamcast_shelf); this one, the only one with a comment header above the block rather than the block at line 1, kept it. Nothing here has needed it since: the cross build carriesdefault.gembox, and withmruby-bin-mrbcin it,CrossBuild#bind_mrbc_hostgenerates an mrbc build of its own where the config declares no host (:712). Every other cross config inbuild_config/is written that way.So rather than naming a host build that has nothing left to do, this deletes it, as 1520c97 did.
What the block does on master
Run from a clean tree, the config does not get past it. The host build defines
MRB_USE_READLINE, which mirb has not taken since 527018c, and aborts before the cross target is reached:Verified
Without it, the same run reaches the cross target and stops where a machine without the Edison SDK has to stop, on the cross compiler, and
build/hostis not created:The mrbc the cross target compiles its Ruby with is the generated one, built with the host gcc into the directory that mechanism names:
The cross target itself still carries
MRB_USE_READLINE, and will fail on the same mirb line once the SDK is present; that is the target's own define, and out of the scope of removing a host build that duplicated it.Environment
Details
The one build that compiles here is the generated
mrbc/default; the line it givesmrbgems/mruby-compiler/src/codegen.c, read off the.flagsrecord beside the object, the-Ilist and-odropped:Summary by CodeRabbit