Skip to content

Get Windows Scons build working#34

Open
slipher wants to merge 11 commits into
masterfrom
slipher/windows
Open

Get Windows Scons build working#34
slipher wants to merge 11 commits into
masterfrom
slipher/windows

Conversation

@slipher

@slipher slipher commented Jul 3, 2026

Copy link
Copy Markdown
Member

Get the native Windows build with Scons working. All targets build, and (on 64-bit at least) most tests pass. You need MSVC and also MinGW (just to use the GNU assembler). In the Scons command line you must pass saigo=1 (as always), --no-clang, and mingw_dir=....

slipher added 11 commits July 3, 2026 03:06
This reverts commit 1d34ecb7cdd1e5b295ac107107abc09b22e866d8.
That commit made it so that MSVC builds could only be done on Google's
build bot.

DEPS and buildbot/ changes were left out the revert. buildbot/ is not
used by us and has a conflict.
Now I can build the loader and IRT with VS 2022, and external SCons
(with pywin32 module installed), e.g.
scons.exe platform=x86-64 saigo=1 werror=0 --no-clang --mode=opt-host,nacl irt_core sel_ldr
The 32-bit Windows exit codes are interpreted as signed in Python 2 and
unsigned in Python 3.
The Windows builds are mostly based on MSVC, but they use the MinGW
assembler. Also use this to provide readelf for the run.py test.
In run.py, on Windows add the extension to search for readelf.exe rather
than readelf. It worked by accident upstream since there was a bash
script named readelf in the same directory as readelf.exe.
This reverts commit 5361d3c.

Makes platform_qual_test fail.

I think it would be better to remove the check in production but keep it
in the test.
The test target run_redir_test breaks if files are checked out with CRLF
line endings.

Note: Chromium suggests that you should set core.autocrlf = false in Git
for working with any of their repositories.
If you had scons.exe installed in the PATH (as opposed to doing python
-m SCons), it would be annoying that typing `scons` finds scons.bat
before scons.exe.
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.

1 participant