diff --git a/bazel/.bazelrc b/bazel/.bazelrc index 6e40e213e..08f7d3938 100644 --- a/bazel/.bazelrc +++ b/bazel/.bazelrc @@ -11,7 +11,7 @@ common --noenable_bzlmod common --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 common --registry=https://bcr.bazel.build/ -common --registry=https://raw.githubusercontent.com/envoyproxy/toolshed/662020165c0c7e12c457f336f3197db378f9461e/bazel-registry +common --registry=https://raw.githubusercontent.com/envoyproxy/toolshed/cd3b5dba31694fdaf285093ef2addcab4021f3aa/bazel-registry ############################################################################# diff --git a/bazel/compile/test/BUILD.bazel b/bazel/compile/test/BUILD.bazel index 1e82a58ec..6b5018024 100644 --- a/bazel/compile/test/BUILD.bazel +++ b/bazel/compile/test/BUILD.bazel @@ -10,6 +10,7 @@ package(default_visibility = ["//visibility:public"]) cc_binary( name = "hello_world", srcs = ["hello_world.cc"], + copts = ["-Werror"], ) # Cross-compilation architecture check tests. diff --git a/bazel/patches/toolchains_llvm.patch b/bazel/patches/toolchains_llvm.patch index d134a9891..088711ee4 100644 --- a/bazel/patches/toolchains_llvm.patch +++ b/bazel/patches/toolchains_llvm.patch @@ -59,7 +59,7 @@ diff --git a/toolchain/internal/configure.bzl b/toolchain/internal/configure.bzl index e0ad59e..e3b8e71 100644 --- a/toolchain/internal/configure.bzl +++ b/toolchain/internal/configure.bzl -@@ -150,6 +150,60 @@ def llvm_config_impl(rctx): +@@ -150,6 +150,65 @@ def llvm_config_impl(rctx): use_absolute_paths_sysroot, ) @@ -86,6 +86,8 @@ index e0ad59e..e3b8e71 100644 + ] + cxx_lib_link_flags[target_pair] = [ + "-L" + cxx_lib_path + "/lib", ++ "-l:libc++.a", ++ "-l:libc++abi.a", + ] + cxx_lib_cxx_flags[target_pair] = [ + "-nostdinc++", @@ -115,7 +117,10 @@ index e0ad59e..e3b8e71 100644 + merged_stdlib = dict(rctx.attr.stdlib) + for target_pair in rctx.attr.cxx_lib.keys(): + if target_pair not in merged_stdlib: -+ merged_stdlib[target_pair] = "libc++" ++ if target_pair == exec_pair: ++ merged_stdlib[target_pair] = "libc++" ++ else: ++ merged_stdlib[target_pair] = "libc" + workspace_name = rctx.name toolchain_info = struct(