builder: link stack probes on Windows amd64 and arm64

Go 1.27 packages can emit stack probes on Windows amd64 and arm64.
Link the compiler-rt stack probe builtins and use compiler-rt for those
targets so these packages build.
This commit is contained in:
Jake Bailey
2026-07-08 10:05:34 -07:00
committed by Ron Evans
parent bd1d11d166
commit 07c9cdcbc4
2 changed files with 29 additions and 2 deletions
+2
View File
@@ -475,10 +475,12 @@ func defaultTarget(options *Options) (*TargetSpec, error) {
"-m", "i386pep",
"--image-base", "0x400000",
)
spec.RTLib = "compiler-rt"
case "arm64":
spec.LDFlags = append(spec.LDFlags,
"-m", "arm64pe",
)
spec.RTLib = "compiler-rt"
}
spec.LDFlags = append(spec.LDFlags,
"-Bdynamic",