+set "FRIIDUMP_BUILD_COMMIT_EFFECTIVE=%FRIIDUMP_BUILD_COMMIT%"
+if not defined FRIIDUMP_BUILD_COMMIT_EFFECTIVE if exist "%~dp0CANDIDATE.json" (
+ for /f "usebackq delims=" %%G in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "$d = Get-Content -Raw -LiteralPath '%~dp0CANDIDATE.json' | ConvertFrom-Json; $d.candidate_implementation.commit"`) do set "FRIIDUMP_BUILD_COMMIT_EFFECTIVE=%%G"
+)
+if not defined FRIIDUMP_BUILD_COMMIT_EFFECTIVE (
+ for /f "usebackq delims=" %%G in (`git -C "%~dp0" rev-parse HEAD 2^>nul`) do set "FRIIDUMP_BUILD_COMMIT_EFFECTIVE=%%G"
+)
+
+if defined FRIIDUMP_BUILD_COMMIT_EFFECTIVE (
+ powershell -NoProfile -ExecutionPolicy Bypass -Command "if ($env:FRIIDUMP_BUILD_COMMIT_EFFECTIVE -notmatch '^[0-9a-fA-F]{40}$') { Write-Error 'FRIIDUMP_BUILD_COMMIT must be exactly 40 hexadecimal characters.'; exit 1 }"
+ if errorlevel 1 exit /b %ERRORLEVEL%
+ echo [INFO] Native-report build commit: %FRIIDUMP_BUILD_COMMIT_EFFECTIVE%
+) else (
+ echo [INFO] Native-report build commit: not embedded ^(set FRIIDUMP_BUILD_COMMIT to a full 40-character commit^)
+)
+
+set "EFFECTIVE_RSP=%~dp0build-msvc32\friidump-effective.rsp"
+copy /y "%~dp0msvc32_friidump.rsp" "%EFFECTIVE_RSP%" >nul
+if errorlevel 1 exit /b %ERRORLEVEL%
+if defined FRIIDUMP_BUILD_COMMIT_EFFECTIVE >>"%EFFECTIVE_RSP%" echo /DFRIIDUMP_BUILD_COMMIT=\"%FRIIDUMP_BUILD_COMMIT_EFFECTIVE%\"
+
+call "%~dp0.vscode\msvc32.cmd" cl @"%EFFECTIVE_RSP%" /link ole32.lib
+if errorlevel 1 exit /b %ERRORLEVEL%
+
+call "%~dp0build_msvc32_xbox_portable_tests.cmd"