diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index a4615bc57859..0fcce79da412 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -984,7 +984,11 @@ def _rules_ruby(): external_http_archive("rules_ruby") def _foreign_cc_dependencies(): - external_http_archive(name = "rules_foreign_cc") + external_http_archive( + name = "rules_foreign_cc", + patches = ["@envoy//bazel:rules_foreign_cc.patch"], + patch_args = ["-p1"], + ) def _com_github_maxmind_libmaxminddb(): external_http_archive( diff --git a/bazel/rules_foreign_cc.patch b/bazel/rules_foreign_cc.patch new file mode 100644 index 000000000000..147ea52e349e --- /dev/null +++ b/bazel/rules_foreign_cc.patch @@ -0,0 +1,14 @@ +diff --git a/toolchains/private/BUILD.bazel b/toolchains/private/BUILD.bazel +index 4ccdeef..25658e9 100644 +--- a/toolchains/private/BUILD.bazel ++++ b/toolchains/private/BUILD.bazel +@@ -23,6 +23,9 @@ native_tool_toolchain( + make_tool( + name = "make_tool", + srcs = "@gnumake_src//:all_srcs", ++ features = [ ++ "-default_link_libs", ++ ], + tags = ["manual"], + ) +