diff --git a/site_scons/site_tools/naclsdk.py b/site_scons/site_tools/naclsdk.py index 1688906392..043edf64ef 100755 --- a/site_scons/site_tools/naclsdk.py +++ b/site_scons/site_tools/naclsdk.py @@ -627,7 +627,7 @@ def quote_for_at_file(s): # user-friendly to not let obsession with architectural # purity get in the way of just being helpful, so we'll # reach into SCons.Action directly. - if SCons.Action.print_actions: + if SCons.Script.ARGUMENTS.get('verbose'): cmdstr = env.subst(self.cmdstr, SCons.Subst.SUBST_RAW, target, source) if self.cmdstr is not None else '' # Print our message only if XXXCOMSTR returns an empty string diff --git a/site_scons/site_tools/target_platform_windows.py b/site_scons/site_tools/target_platform_windows.py index 22e36d2cf0..4767d5bbf0 100755 --- a/site_scons/site_tools/target_platform_windows.py +++ b/site_scons/site_tools/target_platform_windows.py @@ -402,7 +402,10 @@ def RES(*argv, **karg): ], # Omit the absolute pathname of the .pdb debugging info file # from the executable, and just use a relative pathname. - LINKFLAGS_OPTIMIZED=['/PDBALTPATH:%_PDB%'], + # SCons passes /DEBUG when PDB is set, which defaults to incremental + # linking without dead-code removal, so override that explicitly. + LINKFLAGS_OPTIMIZED=['/PDBALTPATH:%_PDB%', '/INCREMENTAL:NO', '/OPT:REF', + '/OPT:ICF'], # Settings for component_builders COMPONENT_LIBRARY_LINK_SUFFIXES=['.lib'], diff --git a/tools/msvc_release.bat b/tools/msvc_release.bat new file mode 100644 index 0000000000..e12752c04f --- /dev/null +++ b/tools/msvc_release.bat @@ -0,0 +1,41 @@ +@echo off +setlocal + +set RELEASE_VERSION=20261026 + +set JOBS=8 +set SCONS=python3 -m SCons +set ZIP7="C:\Program Files\7-Zip\7z" +set SAIGO_DIR=toolchain\saigosdk-windows-amd64_20260925 + +:: Must set MSYS_DIR on command line. The MinGW distro doesn't really have to be MSYS +:: but this makes it more convenient to set just one variable. +set MINGW_AMD64="%MSYS_DIR%\mingw64" +set MINGW_I686="%MSYS_DIR%\mingw32" + +%MINGW_AMD64%\bin\as --version +%MINGW_I686%\bin\as --version +%ZIP7% +python3 -m pip freeze + +rd /S /Q scons-out release + +git log -1 +git status + +%SCONS% -j%JOBS% --mode=opt-win,nacl_irt saigo_newlib_dir=%SAIGO_DIR% mingw_dir=%MINGW_AMD64% platform=x86-64 saigo=1 --no-clang werror=0 sysinfo=0 sel_ldr irt_core || exit /B +%SCONS% -j%JOBS% --mode=opt-win,nacl_irt saigo_newlib_dir=%SAIGO_DIR% mingw_dir=%MINGW_I686% platform=x86-32 saigo=1 --no-clang werror=0 sysinfo=0 sel_ldr irt_core || exit /B + +mkdir release +cd release + +set TGT64=naclruntime-windows-amd64_%RELEASE_VERSION% +set TGT32=naclruntime-windows-i686_%RELEASE_VERSION% +mkdir %TGT64% +mkdir %TGT32% +copy ..\scons-out\opt-win-x86-64\staging\sel_ldr.exe %TGT64% +copy ..\scons-out\opt-win-x86-32\staging\sel_ldr.exe %TGT32% +copy ..\scons-out\nacl_irt-x86-64\staging\irt_core.nexe %TGT64% +copy ..\scons-out\nacl_irt-x86-32\staging\irt_core.nexe %TGT32% +%ZIP7% a -tzip -mx=9 %TGT64%.zip %TGT64% || exit /B +%ZIP7% a -tzip -mx=9 %TGT32%.zip %TGT32% || exit /B diff --git a/tools/redirector.exe b/tools/redirector.exe deleted file mode 100755 index 210cd676f9..0000000000 Binary files a/tools/redirector.exe and /dev/null differ