Skip to content

Skip the make jobserver on Windows#9630

Merged
hsbt merged 3 commits into
masterfrom
claude/confident-dhawan-40f0a0
Jun 18, 2026
Merged

Skip the make jobserver on Windows#9630
hsbt merged 3 commits into
masterfrom
claude/confident-dhawan-40f0a0

Conversation

@hsbt

@hsbt hsbt commented Jun 18, 2026

Copy link
Copy Markdown
Member

Since the make jobserver was introduced, bundle install fails on mswin for every gem with native extensions. The parallel installer adds a GNU make --jobserver-auth to MAKEFLAGS, which nmake inherits and reads as bare option letters. nmake then aborts each build with fatal error U1065: invalid option '-'. This broke ruby/rbs CI while installing bigdecimal, prism, digest, ffi and others.

https://github.com/ruby/rbs/actions/runs/27736519019/job/82054372031

mingw and other Windows toolchains use GNU make and consume the jobserver tokens through the inherited pipe without trouble, so the skip is limited to nmake. The make program is detected the same way the extension builder picks it, honoring the MAKE environment variable and the mswin default.

The added spec forces nmake through the MAKE environment variable and checks that MAKEFLAGS is left untouched.

hsbt and others added 2 commits June 18, 2026 16:09
The POSIX make jobserver passes tokens through an inherited pipe
identified by file descriptor numbers, which Windows cannot inherit, and
nmake aborts every native extension build with `fatal error U1065:
invalid option '-'` when it finds the GNU make `--jobserver-auth` left in
MAKEFLAGS. Skip the jobserver entirely on Windows so bundle install keeps
working with nmake.

https://github.com/ruby/rbs/actions/runs/27736519019/job/82054372031

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The example exercises the genuine Windows code path, so tag it
`windows_only` and exclude it elsewhere instead of stubbing
`Gem.win_platform?`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The first version skipped the jobserver on every Windows platform, but
mingw uses GNU make and consumes the jobserver tokens through the
inherited pipe without trouble. Only nmake on mswin reads MAKEFLAGS as
bare option letters and rejects the GNU make `--jobserver-auth`. Detect
nmake the way the extension builder does and skip the jobserver only
then, so mingw keeps building in parallel.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hsbt hsbt enabled auto-merge June 18, 2026 08:05
@hsbt hsbt merged commit cae04de into master Jun 18, 2026
110 checks passed
@hsbt hsbt deleted the claude/confident-dhawan-40f0a0 branch June 18, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant