summaryrefslogtreecommitdiffstats
path: root/tests/run-make/emit-named-files
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/run-make/emit-named-files
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make/emit-named-files')
-rw-r--r--tests/run-make/emit-named-files/Makefile33
-rw-r--r--tests/run-make/emit-named-files/foo.rs1
2 files changed, 34 insertions, 0 deletions
diff --git a/tests/run-make/emit-named-files/Makefile b/tests/run-make/emit-named-files/Makefile
new file mode 100644
index 000000000..e081fa479
--- /dev/null
+++ b/tests/run-make/emit-named-files/Makefile
@@ -0,0 +1,33 @@
+include ../../run-make-fulldeps/tools.mk
+
+OUT=$(TMPDIR)/emit
+
+all: asm llvm-bc llvm-ir obj metadata link dep-info mir
+
+asm: $(OUT)
+ $(RUSTC) --emit asm=$(OUT)/libfoo.s foo.rs
+ test -f $(OUT)/libfoo.s
+llvm-bc: $(OUT)
+ $(RUSTC) --emit llvm-bc=$(OUT)/libfoo.bc foo.rs
+ test -f $(OUT)/libfoo.bc
+llvm-ir: $(OUT)
+ $(RUSTC) --emit llvm-ir=$(OUT)/libfoo.ll foo.rs
+ test -f $(OUT)/libfoo.ll
+obj: $(OUT)
+ $(RUSTC) --emit obj=$(OUT)/libfoo.o foo.rs
+ test -f $(OUT)/libfoo.o
+metadata: $(OUT)
+ $(RUSTC) --emit metadata=$(OUT)/libfoo.rmeta foo.rs
+ test -f $(OUT)/libfoo.rmeta
+link: $(OUT)
+ $(RUSTC) --emit link=$(OUT)/libfoo.rlib foo.rs
+ test -f $(OUT)/libfoo.rlib
+dep-info: $(OUT)
+ $(RUSTC) --emit dep-info=$(OUT)/libfoo.d foo.rs
+ test -f $(OUT)/libfoo.d
+mir: $(OUT)
+ $(RUSTC) --emit mir=$(OUT)/libfoo.mir foo.rs
+ test -f $(OUT)/libfoo.mir
+
+$(OUT):
+ mkdir -p $(OUT)
diff --git a/tests/run-make/emit-named-files/foo.rs b/tests/run-make/emit-named-files/foo.rs
new file mode 100644
index 000000000..c1bfaa6ca
--- /dev/null
+++ b/tests/run-make/emit-named-files/foo.rs
@@ -0,0 +1 @@
+#![crate_type = "rlib"]