diff --git a/bazel/cc_toolchains/cc_toolchain_cpp_features.bzl b/bazel/cc_toolchains/cc_toolchain_cpp_features.bzl index d178d156c544..3618b0bbce7f 100644 --- a/bazel/cc_toolchains/cc_toolchain_cpp_features.bzl +++ b/bazel/cc_toolchains/cc_toolchain_cpp_features.bzl @@ -321,8 +321,13 @@ def libcxx_feature(llvm_bindir = None, clang_bindir = None): "-unwindlib=libunwind", ])], with_features = [ - # libc++ is only used on non-Windows platforms. - with_feature_set(not_features = ["windows_target"]), + # libc++ is only used on non-Windows platforms, and macOS + # doesn't support a custom unwinding library (or need one) + # even when using libc++. + with_feature_set(not_features = [ + "macos_target", + "windows_target", + ]), ], ), flag_set(