From 134b6844e47586af299b44747cef4720a2a0ac17 Mon Sep 17 00:00:00 2001 From: Matt Liberty Date: Sat, 11 Apr 2026 06:26:56 +0000 Subject: [PATCH] Resolve dbg linker problems due to asserts libstdc++ and libc++ differ and abc uses asserts. It is compiled with libstdc++ headers and then linked with libc++ without this change. Signed-off-by: Matt Liberty --- .bazelrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.bazelrc b/.bazelrc index a4cdbe00e22..c842e09e086 100644 --- a/.bazelrc +++ b/.bazelrc @@ -65,6 +65,11 @@ build --cxxopt "-Wno-dangling" --host_cxxopt "-Wno-dangling" build --per_file_copt=.*external/.*@-w build --host_per_file_copt=.*external/.*@-w +# This avoid problems with building -c dbg which enables asserts. +# Without this libstdc++ vs libc++ differences cause link errors. +build --per_file_copt=.*external/abc.*@-stdlib=libc++ +build --host_per_file_copt=.*external/abc.*@-stdlib=libc++ + ##### Platform-specific configs (auto-selected) ############# # --enable_platform_specific_config makes bazel automatically apply # build:macos on macOS, build:linux on Linux, etc.