This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree 3 files changed +25
-34
lines changed
tests/run-make/emit-named-files 3 files changed +25
-34
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ run-make/dump-ice-to-disk/Makefile
38
38
run-make/dump-mono-stats/Makefile
39
39
run-make/duplicate-output-flavors/Makefile
40
40
run-make/dylib-chain/Makefile
41
- run-make/emit-named-files/Makefile
42
41
run-make/emit-path-unhashed/Makefile
43
42
run-make/emit-shared-files/Makefile
44
43
run-make/emit-stack-sizes/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ use std:: fs:: create_dir;
2
+ use std:: path:: Path ;
3
+
4
+ use run_make_support:: { rustc, tmp_dir} ;
5
+
6
+ fn emit_and_check ( out_dir : & Path , out_file : & str , format : & str ) {
7
+ let out_file = out_dir. join ( out_file) ;
8
+ rustc ( ) . input ( "foo.rs" ) . emit ( & format ! ( "{format}={}" , out_file. display( ) ) ) . run ( ) ;
9
+ assert ! ( out_file. is_file( ) ) ;
10
+ }
11
+
12
+ fn main ( ) {
13
+ let out_dir = tmp_dir ( ) . join ( "emit" ) ;
14
+
15
+ create_dir ( & out_dir) . unwrap ( ) ;
16
+
17
+ emit_and_check ( & out_dir, "libfoo.s" , "asm" ) ;
18
+ emit_and_check ( & out_dir, "libfoo.bc" , "llvm-bc" ) ;
19
+ emit_and_check ( & out_dir, "libfoo.ll" , "llvm-ir" ) ;
20
+ emit_and_check ( & out_dir, "libfoo.o" , "obj" ) ;
21
+ emit_and_check ( & out_dir, "libfoo.rmeta" , "metadata" ) ;
22
+ emit_and_check ( & out_dir, "libfoo.rlib" , "link" ) ;
23
+ emit_and_check ( & out_dir, "libfoo.d" , "dep-info" ) ;
24
+ emit_and_check ( & out_dir, "libfoo.mir" , "mir" ) ;
25
+ }
You can’t perform that action at this time.
0 commit comments