diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2024-12-28 16:50:38 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-28 16:50:38 +1100 |
| commit | 3048c4adfcfaeebec1c1ad4f59e614ea8514b8a1 (patch) | |
| tree | 4d667e20088250ae22e41a06bc7c6c57533901dd /tests/codegen/const-array.rs | |
| parent | dd03fba6dd222c3e2ea03369f47151e78acf2d68 (diff) | |
| parent | b77ab2dd90b8636a38cb34a3e6fe73dbb1e7b0f1 (diff) | |
| download | rust-3048c4adfcfaeebec1c1ad4f59e614ea8514b8a1.tar.gz rust-3048c4adfcfaeebec1c1ad4f59e614ea8514b8a1.zip | |
Rollup merge of #134829 - jieyouxu:migrate-libs-through-symlinks, r=lqd
Migrate `libs-through-symlink` to rmake.rs
Part of https://github.com/rust-lang/rust/issues/121876.
This PR migrates `tests/run-make/libs-through-symlink/` to use rmake.rs.
- Regression test for #13890.
- Original fix PR is #13903.
- Document test intent, backlink to #13890 and fix PR #13903.
- Fix the test logic: the `Makefile` version seems to not actually be exercising the "library search traverses symlink" logic, because the actual symlinked-to-library is present under the `$(TMPDIR)` directory tree when `bar.rs` is compiled, because the `$(RUSTC)` invocation has an implicit `-L $(TMPDIR)`. The symlink itself was actually broken, i.e. it should've been `ln -nsf $(TMPDIR)/outdir/$(NAME) $(TMPDIR)` but it used `ln -nsf outdir/$(NAME) $(TMPDIR)`. The rmake.rs version now explicitly separates the two directory trees and sets the CWD of the `bar.rs` rustc invocation so that the actual library is *not* present under its CWD tree.
I.e. it is now
```
$test_output/ # rustc foo.rs -o actual_lib_dir/libfoo.rlib
actual_lib_dir/
libfoo.rlib
symlink_lib_dir/ # CWD set; rustc -L . bar.rs
libfoo.rlib --> $test_output/actual_lib_dir/libfoo.rlib
```
Partially supersedes #129011.
This PR is co-authored with `@Oneirical.`
r? compiler
Diffstat (limited to 'tests/codegen/const-array.rs')
0 files changed, 0 insertions, 0 deletions
