Commit 72c67cd
Handle all
## Summary
Handle all `-isystem` variant flags in cargo build script path
rewriting.
## Problem
When Bazel passes CC toolchain flags to cargo build scripts, paths
following `-isystem` are prefixed with `${pwd}` so they resolve
correctly inside the sandbox. However, several other Clang flags that
take system include paths were not handled:
- `-stdlib++-isystem` — C++ standard library headers
- `-isystem-after` — appended to SYSTEM include search path
- `-cxx-isystem` — C++ SYSTEM include search path
See the [Clang command line
reference](https://clang.llvm.org/docs/ClangCommandLineReference.html)
for the full set.
This caused cargo build scripts to fail when the CC toolchain used any
of these flags, because paths weren't rewritten for the sandbox.
## Fix
Add `-stdlib++-isystem`, `-isystem-after`, and `-cxx-isystem` to the
flag list in `_pwd_flags_isystem`.
---
> **Note:** This PR was largely AI-generated using Claude Code, with
human review and guidance throughout.
Co-authored-by: Tamas Vajk <tamas.vajk@databricks.com>-isystem variant flags in cargo build script path rewriting (#3996)1 parent cfef262 commit 72c67cd
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
252 | | - | |
| 251 | + | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
0 commit comments