Skip to content

Commit 7622ea3

Browse files
committed
toolchain config: use "-l:libc++.a" and "-l:libc++abi.a" in sysroot
When cross compiling with a sysroot, the toolchain defaults to libstdc++. However, if a user specifically select libc++ like so: ``` stdlib = { "linux-aarch64": "libc++", "linux-x86_64": "libc++", }, ``` ... we emit invalid linker flags. For all sysroots I could find, the name of the archive is "libc++.a" and "libc++abi.a", not "c++.a".
1 parent edd970c commit 7622ea3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

toolchain/cc_toolchain_config.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ def cc_toolchain_config(
289289
]
290290

291291
link_flags.extend([
292-
"-l:c++.a",
293-
"-l:c++abi.a",
292+
"-l:libc++.a",
293+
"-l:libc++abi.a",
294294
])
295295
elif stdlib == "dynamic-stdc++":
296296
cxx_flags = [

0 commit comments

Comments
 (0)