diff --git a/bazel/external/rules_go.patch b/bazel/external/rules_go.patch index cf5b7c7e370..8877b24364e 100644 --- a/bazel/external/rules_go.patch +++ b/bazel/external/rules_go.patch @@ -1,13 +1,14 @@ diff --git a/go/private/actions/stdlib.bzl b/go/private/actions/stdlib.bzl -index 03acd304..78995d1b 100644 +index 11a8278f..7346aecd 100644 --- a/go/private/actions/stdlib.bzl +++ b/go/private/actions/stdlib.bzl -@@ -92,7 +92,7 @@ def _build_stdlib(go): +@@ -92,7 +92,8 @@ def _build_stdlib(go): ldflags = [ option for option in extldflags_from_cc_toolchain(go) - if option not in ("-lstdc++", "-lc++") -+ if option not in ("-lstdc++", "-lc++", "-l:libstdc++.a", "-l:libc++.a", "-l:libc++abi.a") ++ if option not in ("-lstdc++", "-lc++", "-l:libstdc++.a", "-l:libc++.a", "-l:libc++abi.a") and ++ not (option.startswith("-fsanitize") or option.startswith("-fno-sanitize")) ] env.update({ "CGO_ENABLED": "1",