Skip to content

Commit bacfbec

Browse files
author
Jay Conrod
authored
Force external linking on Windows when race/msan enabled (bazel-contrib#2628)
Fixes bazel-contrib#2614
1 parent 7774bab commit bacfbec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

go/private/actions/link.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ def emit_link(
7474
tool_args.add("-race")
7575
if go.mode.msan:
7676
tool_args.add("-msan")
77-
if (go.mode.static and not go.mode.pure) or go.mode.link != LINKMODE_NORMAL:
77+
if ((go.mode.static and not go.mode.pure) or
78+
go.mode.link != LINKMODE_NORMAL or
79+
go.mode.goos == "windows" and (go.mode.race or go.mode.msan)):
7880
tool_args.add("-linkmode", "external")
7981
if go.mode.static:
8082
extldflags.append("-static")

0 commit comments

Comments
 (0)