File tree Expand file tree Collapse file tree 4 files changed +29
-19
lines changed
parallel-rustc-no-overwrite Expand file tree Collapse file tree 4 files changed +29
-19
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,6 @@ run-make/optimization-remarks-dir/Makefile
156156run-make/output-filename-conflicts-with-directory/Makefile
157157run-make/output-filename-overwrites-input/Makefile
158158run-make/output-type-permutations/Makefile
159- run-make/output-with-hyphens/Makefile
160159run-make/override-aliased-flags/Makefile
161160run-make/overwrite-input/Makefile
162161run-make/panic-abort-eh_frame/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // Rust files with hyphens in their filename should
2+ // not result in compiled libraries keeping that hyphen -
3+ // it should become an underscore. Only bin executables
4+ // should keep the hyphen. This test ensures that this rule
5+ // remains enforced.
6+ // See https://github.com/rust-lang/rust/pull/23786
7+
8+ //@ ignore-cross-compile
9+
10+ use run_make_support:: { path, rustc} ;
11+
12+ fn main ( ) {
13+ rustc ( ) . input ( "foo-bar.rs" ) . crate_type ( "bin" ) . run ( ) ;
14+ assert ! ( path( bin_name( "foo-bar" ) ) . exists( ) ) ;
15+ rustc ( ) . input ( "foo-bar.rs" ) . crate_type ( "lib" ) . run ( ) ;
16+ assert ! ( path( bin_name( "libfoo_bar.rlib" ) ) . exists( ) ) ;
17+ }
Original file line number Diff line number Diff line change 66// See https://github.com/rust-lang/rust/pull/83846
77
88use run_make_support:: { fs_wrapper, rustc} ;
9+ use std:: sync:: { Arc , Barrier } ;
910use std:: thread;
1011
1112fn main ( ) {
12- fs_wrapper:: create_file ( "lib.rs" ) ;
13- let handle1 = thread:: spawn ( move || {
14- rustc ( ) . crate_type ( "lib" ) . arg ( "-Ztemps-dir=temp1" ) . input ( "lib.rs" ) ;
15- } ) ;
16-
17- let handle2 = thread:: spawn ( move || {
18- rustc ( ) . crate_type ( "staticlib" ) . arg ( "-Ztemps-dir=temp2" ) . input ( "lib.rs" ) ;
19- } ) ;
20- handle1. join ( ) . expect ( "lib thread panicked" ) ;
21- handle2. join ( ) . expect ( "staticlib thread panicked" ) ;
13+ let barrier = Arc :: new ( Barrier :: new ( 2 ) ) ;
14+ let handle = {
15+ let barrier = Arc :: clone ( & barrier) ;
16+ thread:: spawn ( move || {
17+ barrier. wait ( ) ;
18+ rustc ( ) . crate_type ( "lib" ) . arg ( "-Ztemps-dir=temp1" ) . input ( "lib.rs" ) ;
19+ } )
20+ } ;
21+ barrier. wait ( ) ;
22+ rustc ( ) . crate_type ( "staticlib" ) . arg ( "-Ztemps-dir=temp2" ) . input ( "lib.rs" ) ;
23+ handle. join ( ) . expect ( "lib thread panicked" ) ;
2224}
You can’t perform that action at this time.
0 commit comments