Skip to content

Commit

Permalink
cmd/racebuild: tweak compilers used for windows syso build
Browse files Browse the repository at this point in the history
Revise the recipe for building a windows race syso slightly to use
the existing compilers on the windows machine (in C:\godep\gcc64\bin)
as opposed to downloading GCC 5.X via "choco install". This requires
updating PATH following the refresh env.

Updates golang/go#35006.
Updates golang/go#53539.

Change-Id: I14c8491159f421f688f8d4b7c84250768d69ea42
Reviewed-on: https://go-review.googlesource.com/c/build/+/414475
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
  • Loading branch information
thanm committed Jan 12, 2023
1 parent 15934aa commit 0f23751
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/racebuild/racebuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,12 @@ cp llvm-project/compiler-rt/lib/tsan/go/race_netbsd_amd64.syso go/src/runtime/ra
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install git -y
if %errorlevel% neq 0 exit /b %errorlevel%
choco install mingw --version 5.3.0 -y
if %errorlevel% neq 0 exit /b %errorlevel%
call refreshenv
echo adding back in compiler path
set PATH=C:\go\bin;%PATH%;C:\godep\gcc64\bin
rem make sure we have a working copy of gcc
gcc --version
if %errorlevel% neq 0 exit /b %errorlevel%
git clone https://go.googlesource.com/go
if %errorlevel% neq 0 exit /b %errorlevel%
cd go
Expand Down

0 comments on commit 0f23751

Please sign in to comment.