Skip to content

fix: prefer MSVC over MinGW for Windows bootstrap#19

Merged
ulises-jeremias merged 1 commit into
mainfrom
fix/windows-msvc-bootstrap
Jun 23, 2026
Merged

fix: prefer MSVC over MinGW for Windows bootstrap#19
ulises-jeremias merged 1 commit into
mainfrom
fix/windows-msvc-bootstrap

Conversation

@ulises-jeremias

Copy link
Copy Markdown
Member

Summary

GHA Windows runners have MSVC (Visual Studio Build Tools) available, which provides the POSIX-compatible headers V needs for bootstrap. The previous code forced MinGW with -gcc, which lacks sys/mman.h, termios.h, and pthread types, causing bootstrap failures on windows-latest.

This PR changes the Windows build to try MSVC first (no -gcc flag), falling back to GCC only if MSVC fails.

Closes #15

Changes

  • Add useGcc parameter to getWindowsBuildCommand (default: false)
  • Try MSVC build first in buildV, fall back to GCC on failure
  • Update tests for the new parameter

Validation

  • npm run lint
  • npm run test
  • npm run build
  • npm run package
  • npm run format-check

GHA Windows runners have MSVC (Visual Studio Build Tools) available,
which provides the POSIX-compatible headers V needs. The previous
code forced MinGW with -gcc, which lacks sys/mman.h, termios.h, and
pthread types, causing bootstrap failures.

Try MSVC first (no -gcc flag), fall back to GCC only if MSVC fails.

Closes #15
@ulises-jeremias ulises-jeremias merged commit a9d32b9 into main Jun 23, 2026
2 checks passed
@ulises-jeremias ulises-jeremias deleted the fix/windows-msvc-bootstrap branch June 23, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows latest bootstrap fails compiling current V master under MinGW

1 participant