Skip to content

Commit 0d42a06

Browse files
author
Tamas Vajk
committed
Handle -stdlib++-isystem in cargo build script path rewriting
The -stdlib++-isystem flag is a standard Clang flag for specifying C++ standard library header paths. When Bazel passes CC toolchain flags to cargo build scripts, paths following this flag need to be prefixed with ${pwd} just like -isystem paths, otherwise the build script can't find the headers in the sandbox.
1 parent f31db8b commit 0d42a06

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cargo/private/cargo_build_script.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def _pwd_flags_fsanitize_ignorelist(args):
249249

250250
def _pwd_flags_isystem(args):
251251
"""Prefix execroot-relative paths in -isystem and -Xclang -internal-isystem arguments with ${pwd}."""
252-
return _prefix_pwd_to_flag(args, ["-isystem", "-internal-isystem"])
252+
return _prefix_pwd_to_flag(args, ["-isystem", "-internal-isystem", "-stdlib++-isystem"])
253253

254254
def _pwd_flags_L(args):
255255
"""Prefix execroot-relative paths in -L arguments with ${pwd}."""

0 commit comments

Comments
 (0)