Skip to content

build_config: give the glib_hal_test config a name of its own - #7200

Merged
matz merged 2 commits into
mruby:masterfrom
takumin:glib-hal-test-own-name
Aug 16, 2026
Merged

build_config: give the glib_hal_test config a name of its own#7200
matz merged 2 commits into
mruby:masterfrom
takumin:glib-hal-test-own-name

Conversation

@takumin

@takumin takumin commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Stacked on #7203, whose commit is the first of the two here. Only the second one, build_config/glib_hal_test.rb, belongs to this PR.

build_config/glib_hal_test.rb opens an anonymous MRuby::Build, and an unnamed build is called host (lib/mruby/build.rb:94). The build tree is keyed by that name (:107), so MRUBY_CONFIG=glib_hal_test aims its objects at build/host, on top of whatever a default build has left there, and never creates a directory of its own. This is the same shape as #7195, #7197 and #7199, on a config none of them touches.

All of the transcripts below are from today's master, gcc 13.3.0, glib 2.80.0.

Sharing build/host breaks this config outright

It loads no gembox at all, so what it shares build/host with is a tree built from a different set of gems, and the presym scan cannot tell them apart. It reads the .pi files the compilers leave behind, and those are keyed on the source timestamp alone, so a .pi a default build preprocessed under its own defines is reused here unchanged. The result is a symbol table belonging to neither build, and this config aborts on the first core file that needs a symbol it lost:

$ rake -j8                               # a default build, exit 0
$ MRUBY_CONFIG=glib_hal_test rake -j8
include/mruby/presym.h:42:23: error: 'MRB_SYM__print' undeclared here (not in a function); did you mean 'MRB_SYM__private'?
   42 | #define MRB_SYM(name) MRB_SYM__##name
      |                       ^~~~~~~~~
src/kernel.c:811:29: note: in expansion of macro 'MRB_SYM'
  811 |   MRB_MT_ENTRY(mrb_print_m, MRB_SYM(print), MRB_ARGS_ANY() | MRB_MT_PRIVATE),
      |                             ^~~~~~~
rake aborted!
Tasks: TOP => build => build/host/lib/libmruby.a => build/host/src/kernel.o

MRB_SYM(p) and MRB_SYM(print) sit behind #ifndef HAVE_MRUBY_IO_GEM (src/kernel.c:809). A default build carries mruby-io and its kernel.pi does not name them; this build carries no io gem and its src/kernel.c does. The stale kernel.pi is what gets scanned:

$ md5sum build/host/src/kernel.pi        # before and after the run
358985be208e175586d7b6486c9726b9  build/host/src/kernel.pi
358985be208e175586d7b6486c9726b9  build/host/src/kernel.pi

The leak runs the other way too. MRB_SYM(Rational) reaches the table from the default build's numeric.pi, preprocessed with -DMRB_USE_RATIONAL, which this build never sets. Against the list the same config writes on a clean tree, this one is missing p, print and the ten mrblib/*.rb file names, and carries Rational that does not belong to it: 442 symbols on a clean tree, 431 here. The file names go missing for the same reason one step further along, since enable_debug appends -g to the mrbc options (:176), so this config's mrblib.c holds them and the default build's, reused here, does not.

What it leaves behind when it does get through

Whether it gets that far is decided by the timestamps in build/host, so the config does build against a tree it does not clobber:

$ rm -rf build/host
$ MRUBY_CONFIG=glib_hal_test rake -j8    # exit 0
$ ls build/host/bin/
mruby_task_demo
$ ls bin/
mirb  mrb  mrbc  mrdb  mruby  mruby-config  mruby-strip  mruby_task_demo
$ wc -l build/host/include/mruby/presym/table.h
889 build/host/include/mruby/presym/table.h

which is the shape the tree is left in either way. MRB_TASK_BUILD_DEMO gives mruby-task a spec.bins, and bin/ symlinks are installed for a host? build (:452), so the demo lands in the repo bin/ beside the default build's commands, and build/host holds an -fsanitize tree at -O0 with an 889 symbol table where the default build's has 3161.

Naming it

The build is named after its config, which is what build_config/asan.rb and build_config/gctest.rb already do, and what 8b44a52 did for host-cxx. Naming is not enough on its own here. The internal mrbc build is created only for a host? build or one carrying mruby-bin-mrbc (:153), and this config loads no gembox to supply it, so the rename alone stops before it compiles anything:

$ MRUBY_CONFIG=glib_hal_test rake -j8
rake aborted!
external mrbc or mruby-bin-mrbc gem in current('glib_hal_test') or 'host' build is required
tasks/mrblib.rake:9

build_config/gctest.rb is the same pair for the same reason, a named build with an explicit mruby-bin-mrbc line.

mruby-bin-mrbc brings a bintest of its own, and the config already sets enable_bintest, where before the rename it had no bintest to run at all. One of its asserts compares the disassembly mrbc writes against the one mruby -v -c writes (mrbgems/mruby-bin-mrbc/bintest/mrbc.rb:85), and nothing here supplies that binary, so it ends the run:

Errno::ENOENT: mrbc -v disassembles like mruby -v => No such file or directory - build/glib_hal_test/bin/mruby
  Total: 5    OK: 4   KO: 0   Crash: 1   Skip: 0

Add mruby-bin-mruby as well, so the test the compiler gem carries has what it asks for.

Verified

Through the sequence that aborted:

$ rake -j8                               # a default build, exit 0
$ MRUBY_CONFIG=glib_hal_test rake -j8    # exit 0
...
      Config Name: glib_hal_test
 Output Directory: build/glib_hal_test
$ ls build/
glib_hal_test  host
$ ls build/glib_hal_test/bin/
mrbc  mruby  mruby_task_demo
$ wc -l build/glib_hal_test/include/mruby/presym/table.h
889 build/glib_hal_test/include/mruby/presym/table.h
$ build/glib_hal_test/bin/mruby_task_demo
[t=    0 ms] main: spawning T2 + T3; running T1 (glib-only) on main thread
===== T3 (Task.run only): zombie/executioner + spinner/stopper + sleepers =====
...

and an existing host build is left byte-identical, with its own table and its own bin/:

$ md5sum build/host/bin/mruby build/host/bin/mrbc build/host/lib/libmruby.a
9881d200e90c5a7df4a29a36b193fbab  build/host/bin/mruby
c6b0d6d168918de337fa27a8d5d2a262  build/host/bin/mrbc
8dbb8c26becf449f5871f9e090c8a4ff  build/host/lib/libmruby.a
$ ar t build/host/lib/libmruby.a | sort -u | wc -l
99
$ wc -l build/host/include/mruby/presym/table.h
3161 build/host/include/mruby/presym/table.h
$ ls bin/
mirb  mrb  mrbc  mrdb  mruby  mruby-config  mruby-strip
$ rake -j8                               # exit 0
$ build/host/bin/mruby -e 'p 1+1'
2

rake test

It passes on top of #7203, which keeps the linker options of a gem whose objects are in libmruby.a. Without that commit mrbtest cannot be linked here at all: MRB_TASK_BUILD_DEMO makes mruby-task a bin gem, and MRuby::Gem::List#linker_attrs dropped the -lglib-2.0 that search_package contributed from the mrbtest link line. With the two together:

$ MRUBY_CONFIG=glib_hal_test rake -m test    # exit 0
bintest - Command Binary Test
  Total: 53    OK: 52   KO: 0    Crash: 0    Skip: 1
mrbtest - Embeddable Ruby Test
  Total: 832   OK: 831  KO: 0    Crash: 0    Skip: 1
$ ls bin/
mirb  mrb  mrbc  mrdb  mruby  mruby-config  mruby-strip

A default build is unaffected, and rake -m test on it stays green:

$ rake -m test                               # exit 0
  Total: 2089  OK: 2041  KO: 0  Crash: 0  Skip: 48

Environment

Details
OS Ubuntu 24.04.4 LTS
Kernel Linux 7.0.0-28-generic x86_64
CPU AMD Ryzen 9 5950X, 16 cores / 32 threads
C compiler gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
binutils GNU ld (GNU Binutils) 2.47.20260726
glib 2.80.0
CRuby running rake ruby 4.0.6 (2026-07-14 revision 03b6d3f889) +PRISM

The line each build gives src/string.c, read off rake --verbose with -MMD -c, the -I list and -o dropped. glib_hal_test calls enable_debug, which appends -g3 -O0 after the gcc toolchain's own -g -O3. The gembox difference the presym scan trips over is visible here as well, in the -D list:

# default
gcc -std=gnu99 -g -O3 -Wall -Wundef -Werror-implicit-function-declaration -Wwrite-strings -DHAVE_MRUBY_REGEXP_GEM -DMRB_USE_SET -DHAVE_MRUBY_IO_GEM -DMRB_USE_RATIONAL -DMRB_USE_COMPLEX -DMRB_USE_BIGINT -DMRB_USE_DEBUG_HOOK src/string.c

# glib_hal_test
gcc -std=gnu99 -g -O3 -Wall -Wundef -Werror-implicit-function-declaration -Wwrite-strings -fsanitize=address,undefined -g3 -O0 -DMRB_TASK_BUILD_DEMO -DMRB_DEBUG -DMRB_USE_TASK_SCHEDULER src/string.c

Summary by CodeRabbit

  • Build Improvements
    • Updated the GLib HAL test build with a dedicated output directory.
    • Included the core compiler and runtime components required for building and running the test suite.
    • Improved build configuration so components containing compiled objects are correctly included, including those that also provide command-line tools.

@takumin
takumin requested a review from matz as a code owner August 16, 2026 15:50
@github-actions github-actions Bot added the build label Aug 16, 2026
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 632739f0-7c77-4cd6-82a4-432f60449949

📥 Commits

Reviewing files that changed from the base of the PR and between f47da02 and 1b1c5df.

📒 Files selected for processing (2)
  • build_config/glib_hal_test.rb
  • lib/mruby/gem.rb
🚧 Files skipped from review as they are similar to previous changes (1)
  • build_config/glib_hal_test.rb

Included review availability: Your plan includes up to 8 reviews per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The glib_hal_test build now uses a dedicated target and directory. It includes the mruby-bin-mrbc and mruby-bin-mruby core gems. List#linker_attrs now selects gems with object files and avoids duplicate entries.

Changes

Build configuration and gem linking

Layer / File(s) Summary
Configure the glib_hal_test target
build_config/glib_hal_test.rb
The build uses the glib_hal_test name and a dedicated directory. It adds the mruby-bin-mrbc and mruby-bin-mruby core gems, including the latter’s bintest.
Select linkable gems
lib/mruby/gem.rb
List#linker_attrs includes non-binary gems and binary gems that provide object files. It excludes binary-only gems and avoids duplicate optional gem entries.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 1b1c5

This change gives the GLib HAL test build its own output tree and preserves the existing host build; no actionable merge-blocking risk remains beyond normal checks and review.

Possibly related PRs

Suggested labels: mrbgems

Suggested reviewers: matz, dearblue

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: giving the glib_hal_test build configuration its own named build directory.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

`MRuby::Gem::List#linker_attrs` drops every gem that builds a binary,
and hands the rest to each link of libmruby.a.  5c130e8 added that for
mruby#5210, where a gem's options reached binaries the gem had nothing to do
with.  It reads `bin?` as "not a library gem", and a gem can be both.

`build.libmruby_objs << @objs` (lib/mruby/gem.rb:103) is unconditional,
so a gem with a src/ or an mrblib/ puts objects in libmruby.a whatever
else it builds.  When such a gem also declares `spec.bins`, its objects
are in the archive and its linker options are not on the line that links
it, so anything but its own binary fails to link.

`mruby-task` is that gem as soon as `MRB_TASK_BUILD_DEMO` is set: the
define gives it `spec.bins` (mrbgems/mruby-task/mrbgem.rake:52), and it
carries src/ and a ports/<port>/ HAL whose glib port is what needs the
`search_package` libraries.  build_config/glib_hal_test.rb sets both, and
mrbtest cannot be linked there:

    $ MRUBY_CONFIG=glib_hal_test rake -m test
    ld: mrbgems/mruby-task/ports/glib/task_hal.c:132: undefined
    reference to `g_main_loop_quit'
    ld: mrbgems/mruby-task/ports/glib/task_hal.c:134: undefined
    reference to `g_thread_join'
    ...
    rake aborted!
    Tasks: TOP => bin/mrbtest => build/host/bin/mrbtest

    gcc -fsanitize=address,undefined -o "build/host/bin/mrbtest"
      .../driver.o .../vformat.o .../mrbtest.o .../mrbtest.a
      "build/host/lib/libmruby.a"  -lm

Drop a binary gem only when it contributes no object.  A gem that put
nothing in libmruby.a still has options that belong to its own binary
alone, which is what mruby#5210 asked for, and one that did needs them
wherever libmruby.a is linked:

    $ MRUBY_CONFIG=glib_hal_test rake -m test    # exit 0
    bintest - Command Binary Test
      Total: 0     OK: 0    KO: 0    Crash: 0    Skip: 0
    mrbtest - Embeddable Ruby Test
      Total: 832   OK: 831  KO: 0    Crash: 0    Skip: 1

    gcc -fsanitize=address,undefined -o "build/host/bin/mrbtest"
      .../driver.o .../vformat.o .../mrbtest.o .../mrbtest.a
      "build/host/lib/libmruby.a" -L/usr/lib/x86_64-linux-gnu -lglib-2.0
      -L/usr/lib/x86_64-linux-gnu -lgthread-2.0 -pthread -lglib-2.0 -lm

Those libraries appear twice because the gem calls `search_package`
twice, before and after this commit alike.

The second line follows from the first.  tasks/bin.rake:10 asks for
`linker_attrs(gem)` when it links a gem's own binary, and a gem that now
stays in the library set would be appended to it a second time, so its
options would be doubled on that line.  Append it only when it is not
already there.  build/host/bin/mruby_task_demo is linked with the same
line as before:

    gcc -fsanitize=address,undefined -o "build/host/bin/mruby_task_demo"
      .../mruby_task_demo.o "build/host/lib/libmruby.a"
      -L/usr/lib/x86_64-linux-gnu -lglib-2.0
      -L/usr/lib/x86_64-linux-gnu -lgthread-2.0 -pthread -lglib-2.0 -lm

Nothing in the standard gemboxes moves.  Every core binary gem ships a
tools/ and no src/ or mrblib/, so `@objs` is empty for all of them
(:62, :96, :97) and the set `linker_attrs` returns is the one it
returned before.  The default build links bin/mruby and bin/mirb with
byte-identical command lines, and `rake -m test` is green:

    $ rake -m test                               # exit 0
      Total: 2089  OK: 2041  KO: 0  Crash: 0  Skip: 48

The example from mruby#5210 behaves as it did.  A gem carrying only a
tools/foo/main.c and `spec.linker.library_paths << "/usr/lib/foo"`,
built beside mruby-bin-mirb, keeps that path off every line but its own,
and it appears once in the whole run:

    $ MRUBY_CONFIG=issue5210.rb rake --verbose > log    # exit 0
    $ grep -c /usr/lib/foo log
    1
    $ grep -o 'gcc.*bin/foo".*' log
    gcc -L/usr/lib/foo -o "build/issue5210/bin/foo" .../main.o
      "build/issue5210/lib/libmruby.a"  -lm
    $ grep -o 'gcc.*bin/mirb".*' log
    gcc  -o "build/issue5210/bin/mirb" .../mirb.o ...
      "build/issue5210/lib/libmruby.a"  -lm
build_config/glib_hal_test.rb opened an anonymous `MRuby::Build`, and an
unnamed build is called 'host' (lib/mruby/build.rb:94).  The build tree
is keyed by that name (:107), so MRUBY_CONFIG=glib_hal_test aimed its
objects at build/host, on top of whatever a default build had left
there.  No build/glib_hal_test was ever created.

This config loads no gembox at all, so what it shares build/host with is
a tree built from a different set of gems, and the presym scan cannot
tell them apart.  It reads the `.pi` files the compilers leave behind,
and those are keyed on the source timestamp alone, so a `.pi` a default
build preprocessed under its own defines is reused here unchanged.  The
result is a symbol table belonging to neither build, and this config
aborts on the first core file that needs a symbol it lost:

    $ rake -j8                               # a default build, exit 0
    $ MRUBY_CONFIG=glib_hal_test rake -j8
    include/mruby/presym.h:42:23: error: 'MRB_SYM__print' undeclared
    here (not in a function); did you mean 'MRB_SYM__private'?
       42 | #define MRB_SYM(name) MRB_SYM__##name
    src/kernel.c:811:29: note: in expansion of macro 'MRB_SYM'
      811 |   MRB_MT_ENTRY(mrb_print_m, MRB_SYM(print), MRB_ARGS_ANY() |
          |   MRB_MT_PRIVATE),
    rake aborted!
    Tasks: TOP => build => build/host/lib/libmruby.a
        => build/host/src/kernel.o

`MRB_SYM(p)` and `MRB_SYM(print)` sit behind `#ifndef HAVE_MRUBY_IO_GEM`
(src/kernel.c:809).  A default build carries mruby-io and its kernel.pi
does not name them; this build carries no io gem and its src/kernel.c
does.  The stale kernel.pi is what gets scanned, so the table is built
without them:

    $ md5sum build/host/src/kernel.pi        # before and after the run
    358985be208e175586d7b6486c9726b9  build/host/src/kernel.pi
    358985be208e175586d7b6486c9726b9  build/host/src/kernel.pi

The leak runs the other way too.  `MRB_SYM(Rational)` reaches the table
from the default build's numeric.pi, preprocessed with
`-DMRB_USE_RATIONAL`, which this build never sets.  Compared with the
same config on a clean tree, the list it writes is missing p, print and
the ten mrblib file names, and carries Rational that does not belong to
it: 442 symbols on a clean tree, 431 here.  The file names go missing
for the same reason, one step further along: `enable_debug` appends -g
to the mrbc options (:176), so this config's mrblib.c holds them and the
default build's, reused here, does not.

Whether it gets that far is decided by the timestamps in build/host, so
the config does build against a tree it does not clobber:

    $ rm -rf build/host
    $ MRUBY_CONFIG=glib_hal_test rake -j8    # exit 0
    $ ls build/host/bin/
    mruby_task_demo

which is the shape the tree is left in either way.  `MRB_TASK_BUILD_DEMO`
gives mruby-task a `spec.bins`, and bin/ symlinks are installed for a
`host?` build (:452), so the demo lands in the repo bin/ beside the
default build's commands, and build/host holds an `-fsanitize` tree at
-O0 with a 889 symbol table where the default build's has 3161.

Name the build after its config, which is what build_config/asan.rb and
build_config/gctest.rb already do, and what 8b44a52 did for host-cxx.
Naming is not enough on its own here.  The internal mrbc build is
created only for a `host?` build or one carrying mruby-bin-mrbc (:153),
and this config loads no gembox to supply it, so the rename alone stops
before it compiles anything:

    $ MRUBY_CONFIG=glib_hal_test rake -j8
    rake aborted!
    external mrbc or mruby-bin-mrbc gem in current('glib_hal_test') or
    'host' build is required
    tasks/mrblib.rake:9

build_config/gctest.rb is the same pair for the same reason, a named
build with an explicit mruby-bin-mrbc line.

mruby-bin-mrbc brings a bintest of its own, and the config already sets
`enable_bintest`, where before the rename it had no bintest to run at
all.  One of its asserts compares the disassembly mrbc writes against
the one `mruby -v -c` writes (mrbgems/mruby-bin-mrbc/bintest/mrbc.rb:85),
and nothing here supplies that binary, so it ends the run:

    Errno::ENOENT: mrbc -v disassembles like mruby -v
      => No such file or directory - build/glib_hal_test/bin/mruby
    Crash: 1

Add mruby-bin-mruby as well, so the test the compiler gem carries has
what it asks for.  With the three lines, the config builds into a
directory of its own, through the sequence that aborted:

    $ rake -j8                               # a default build, exit 0
    $ MRUBY_CONFIG=glib_hal_test rake -j8    # exit 0
    ...
          Config Name: glib_hal_test
     Output Directory: build/glib_hal_test
    $ ls build/
    glib_hal_test  host
    $ ls build/glib_hal_test/bin/
    mrbc  mruby  mruby_task_demo
    $ wc -l build/glib_hal_test/include/mruby/presym/table.h
    889 build/glib_hal_test/include/mruby/presym/table.h

and an existing host build is left byte-identical, with its own table
and its own bin/:

    $ md5sum build/host/bin/mruby build/host/bin/mrbc build/host/lib/libmruby.a
    9881d200e90c5a7df4a29a36b193fbab  build/host/bin/mruby
    c6b0d6d168918de337fa27a8d5d2a262  build/host/bin/mrbc
    8dbb8c26becf449f5871f9e090c8a4ff  build/host/lib/libmruby.a
    $ wc -l build/host/include/mruby/presym/table.h
    3161 build/host/include/mruby/presym/table.h
    $ ls bin/
    mirb  mrb  mrbc  mrdb  mruby  mruby-config  mruby-strip
    $ rake -j8                               # exit 0
    $ build/glib_hal_test/bin/mruby_task_demo
    [t=    0 ms] main: spawning T2 + T3; running T1 (glib-only) on main
    thread
    ...

`rake test` passes on top of the commit before this one, which keeps
the linker options of a gem whose objects are in libmruby.a.  Without
it, mrbtest cannot be linked here at all: `MRB_TASK_BUILD_DEMO` makes
mruby-task a bin gem, and `MRuby::Gem::List#linker_attrs` dropped the
`-lglib-2.0` that `search_package` contributed from the mrbtest link
line.  With the two together:

    $ MRUBY_CONFIG=glib_hal_test rake -m test    # exit 0
    bintest - Command Binary Test
      Total: 53    OK: 52   KO: 0    Crash: 0    Skip: 1
    mrbtest - Embeddable Ruby Test
      Total: 832   OK: 831  KO: 0    Crash: 0    Skip: 1
    $ ls bin/
    mirb  mrb  mrbc  mrdb  mruby  mruby-config  mruby-strip

A default build is unaffected, and `rake -m test` on it stays green:

    $ rake -m test                               # exit 0
      Total: 2089  OK: 2041  KO: 0  Crash: 0  Skip: 48
@takumin
takumin force-pushed the glib-hal-test-own-name branch from f47da02 to 1b1c5df Compare August 16, 2026 16:12
@matz
matz merged commit c258714 into mruby:master Aug 16, 2026
21 checks passed
@takumin
takumin deleted the glib-hal-test-own-name branch August 16, 2026 23:48
takumin added a commit to takumin/mruby that referenced this pull request Aug 18, 2026
build_config/ci/msvc.rb opened an anonymous `MRuby::Build`, and an
unnamed build is called 'host' (lib/mruby/build.rb:114).  The build tree
is keyed by that name (:127), so MRUBY_CONFIG=ci/msvc aimed a full-core
build with `MRB_GC_FIXED_ARENA` at build/host, the directory a default
build on the same machine uses.  The Windows-VC job never sees that,
since it builds a fresh checkout, but a developer who points
MRUBY_CONFIG at this config on a tree the default config has built
shares one directory between two gem sets, which is the shape mruby#7195,
mruby#7197, mruby#7199 and mruby#7200 took out of the other configs that had it.

14d6e42 named the bintest build in ci/gcc-clang and left this one alone,
on the ground that a single build has no sibling for a name to tell it
apart from.  That was a reason about telling builds apart; the build
directory is decided by the name whether or not there is a sibling, and
that is the reason here.

Name it after its config, as build_config/mrbc.rb, clang-asan.rb and
gctest.rb are.  Nothing in the file needs the build to be called
'host'.  It is an `MRuby::Build`, and it pulls `mruby-bin-mrbc` in
through full-core, so it lends no mrbc to any cross target and creates
its own internal one either way (:174).  The name reaches three other
places: `install_prefix` (:625), the `bin/*.bat` wrappers that
`define_installer_if_needed` writes only when `host?` answers true (:461
and :482), and the mrbtest that `rake clean` removes from MRUBY_ROOT/bin
(tasks/test.rake:82).  The job runs `rake -m test:run:serial`
(.github/workflows/build.yml:89), which installs nothing and cleans
nothing, so none of the three fires.  `enable_bintest` has not required
the name 'host' since fd113da, and test/bintest.rb resolves every binary
it runs from BUILD_DIR rather than from bin/; the `bintest` build in
ci/gcc-clang is this same shape under a name, in the same workflow.

There is no MSVC here to run the job with.  What can be checked on
Linux is that the config still loads and that the tree it names is its
own; the job on this change is the run:

    $ MRUBY_CONFIG=ci/msvc rake -T | grep amalgam
    rake amalgam    # Generate amalgamated mruby.h and mruby.c in .../build/msvc/amalgam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants