Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#134829 - jieyouxu:migrate-libs-through-symlinks, r=lqd Migrate `libs-through-symlink` to rmake.rs Part of rust-lang#121876. This PR migrates `tests/run-make/libs-through-symlink/` to use rmake.rs. - Regression test for rust-lang#13890. - Original fix PR is rust-lang#13903. - Document test intent, backlink to rust-lang#13890 and fix PR rust-lang#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 rust-lang#129011. This PR is co-authored with `@Oneirical.` r? compiler
- Loading branch information