File tree Expand file tree Collapse file tree 3 files changed +25
-34
lines changed
tests/run-make/emit-named-files Expand file tree Collapse file tree 3 files changed +25
-34
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ run-make/dump-ice-to-disk/Makefile
3737run-make/dump-mono-stats/Makefile
3838run-make/duplicate-output-flavors/Makefile
3939run-make/dylib-chain/Makefile
40- run-make/emit-named-files/Makefile
4140run-make/emit-path-unhashed/Makefile
4241run-make/emit-shared-files/Makefile
4342run-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