Commit 34ea934
authored
Prefix execroot-relative file arguments with pwd (#4067)
Prefix execroot-relative bare positional file args with pwd in cargo
build scripts. This is already done for `-L`, `-isystem`, `--sysroot`,
etc but not for bare positional arguments like
`bazel-out/bin/compiler-rt/libclang_rt.builtins.static.a`.
This problem arised when compiling `aws-lc-sys` with
[hermetic-llvm](https://github.com/hermeticbuild/hermetic-llvm), see
hermeticbuild/hermetic-llvm#405
A minimal working example to reproduce is created in
https://github.com/martin4861/mwe-bootstrapped-rust-clang_rt.builtins.static:
```
clang: error: no such file or directory:
'bazel-out/darwin_arm64-fastbuild-ST-bdec89fd5d65/bin/external/llvm++llvm_source+compiler-rt/clang_rt.builtins.static_/libclang_rt.builtins.static.a'
```1 parent 301d425 commit 34ea934
3 files changed
Lines changed: 56 additions & 1 deletion
File tree
- cargo
- private
- tests/cargo_build_script/cc_args_and_env
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
210 | 237 | | |
211 | 238 | | |
212 | 239 | | |
213 | 240 | | |
214 | 241 | | |
215 | | - | |
| 242 | + | |
216 | 243 | | |
217 | 244 | | |
218 | 245 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
0 commit comments