summaryrefslogtreecommitdiffstats
path: root/tests/run-make/remap-path-prefix/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/run-make/remap-path-prefix/Makefile
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make/remap-path-prefix/Makefile')
-rw-r--r--tests/run-make/remap-path-prefix/Makefile32
1 files changed, 31 insertions, 1 deletions
diff --git a/tests/run-make/remap-path-prefix/Makefile b/tests/run-make/remap-path-prefix/Makefile
index 2a7378fdf..35f65240f 100644
--- a/tests/run-make/remap-path-prefix/Makefile
+++ b/tests/run-make/remap-path-prefix/Makefile
@@ -2,8 +2,38 @@ include ../tools.mk
# ignore-windows
+ifeq ($(UNAME),Darwin)
+ DEBUGINFOOPTS := -Csplit-debuginfo=off
+else
+ DEBUGINFOOPTS :=
+endif
+
+all: remap remap-with-scope
+
# Checks if remapping works if the remap-from string contains path to the working directory plus more
-all:
+remap:
$(RUSTC) --remap-path-prefix $$PWD/auxiliary=/the/aux --crate-type=lib --emit=metadata auxiliary/lib.rs
grep "/the/aux/lib.rs" $(TMPDIR)/liblib.rmeta || exit 1
! grep "$$PWD/auxiliary" $(TMPDIR)/liblib.rmeta || exit 1
+
+remap-with-scope:
+ $(RUSTC) --remap-path-prefix $$PWD/auxiliary=/the/aux -Zremap-path-scope=object $(DEBUGINFOOPTS) --crate-type=lib --emit=metadata auxiliary/lib.rs
+ grep "/the/aux/lib.rs" $(TMPDIR)/liblib.rmeta || exit 1
+ ! grep "$$PWD/auxiliary" $(TMPDIR)/liblib.rmeta || exit 1
+
+ $(RUSTC) --remap-path-prefix $$PWD/auxiliary=/the/aux -Zremap-path-scope=diagnostics $(DEBUGINFOOPTS) --crate-type=lib --emit=metadata auxiliary/lib.rs
+ ! grep "/the/aux/lib.rs" $(TMPDIR)/liblib.rmeta || exit 1
+ grep "$$PWD/auxiliary" $(TMPDIR)/liblib.rmeta || exit 1
+
+ $(RUSTC) --remap-path-prefix $$PWD/auxiliary=/the/aux -Zremap-path-scope=diagnostics,object $(DEBUGINFOOPTS) --crate-type=lib --emit=metadata auxiliary/lib.rs
+ grep "/the/aux/lib.rs" $(TMPDIR)/liblib.rmeta || exit 1
+ ! grep "$$PWD/auxiliary" $(TMPDIR)/liblib.rmeta || exit 1
+
+ $(RUSTC) --remap-path-prefix $$PWD/auxiliary=/the/aux -Zremap-path-scope=split-debuginfo $(DEBUGINFOOPTS) --crate-type=lib --emit=metadata auxiliary/lib.rs
+ ! grep "/the/aux/lib.rs" $(TMPDIR)/liblib.rmeta || exit 1
+ grep "$$PWD/auxiliary" $(TMPDIR)/liblib.rmeta || exit 1
+
+ # FIXME: We should test the split debuginfo files, but we don't currently a good infra for that
+ $(RUSTC) --remap-path-prefix $$PWD/auxiliary=/the/aux -Zremap-path-scope=split-debuginfo -Zunstable-options -Csplit-debuginfo=packed --crate-type=lib --emit=metadata auxiliary/lib.rs
+ grep "/the/aux/lib.rs" $(TMPDIR)/liblib.rmeta || exit 1
+ ! grep "$$PWD/auxiliary" $(TMPDIR)/liblib.rmeta || exit 1