-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewrite extra-filename-with-temp-outputs to rmake
- Loading branch information
Showing
4 changed files
with
28 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// In order to prevent temporary files from overwriting each other in parallel | ||
// compilation, rustc was changed to mix an extra filename with temporary | ||
// outputs. However, as this is a similar behavior with the codegen flag | ||
// -C extra-filename, this test checks that the manually passed flag | ||
// is not overwritten by this feature, and that the output files | ||
// are named as expected. | ||
// See https://github.com/rust-lang/rust/pull/15686 | ||
|
||
//FIXME(Oneirical): ignore-cross-compile | ||
|
||
use run_make_support::{ | ||
bin_name, cwd, fs_wrapper, has_prefix, has_suffix, rustc, shallow_find_files, | ||
}; | ||
|
||
fn main() { | ||
rustc().extra_filename("bar").input("foo.rs").arg("-Csave-temps").run(); | ||
let object_files = shallow_find_files(cwd(), |path| { | ||
has_prefix(path, "foobar.foo") && has_suffix(path, "0.rcgu.o") | ||
}); | ||
let object_file = object_files.get(0).unwrap(); | ||
fs_wrapper::remove_file(object_file); | ||
fs_wrapper::remove_file(bin_name("foobar")); | ||
} |