diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-06-05 18:21:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-05 18:21:10 +0200 |
| commit | e2ea7d82b1f24451ec0f75eee15f3cdc7cd77d6d (patch) | |
| tree | eea9b922b6ae6125ff89348ba31049bb034723fe /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | 94c19c652298378222e134b07bcc61b0aaa27e80 (diff) | |
| parent | 5e802f07bae5a078c241ed1c2a122e756cbcad30 (diff) | |
| download | rust-e2ea7d82b1f24451ec0f75eee15f3cdc7cd77d6d.tar.gz rust-e2ea7d82b1f24451ec0f75eee15f3cdc7cd77d6d.zip | |
Rollup merge of #125861 - name1e5s:fix/rpath_null_panic, r=michaelwoerister
rustc_codegen_ssa: fix `get_rpath_relative_to_output` panic when lib only contains file name
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.
This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using
r? <reviewer name>
-->
When compiles program with `-C rpath=yes` but with no output filename specified, or with filename ONLY, we will get an ICE for now. Fix it by treat empty `output` path in `get_rpath_relative_to_output` as current dir.
Before this patch:
```bash
rustc -C prefer_dynamic=yes -C rpath=yes -O h.rs # ICE, no output filename specified
rustc -o hello -C prefer_dynamic=yes -C rpath=yes -O h.rs # ICE, output filename has no path
rustc -o ./hello -C prefer_dynamic=yes -C rpath=yes -O h.rs # Works
```
All those examples work after the patch.
Close #119571.
Close #125785.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
