Skip to content

Commit

Permalink
rewrite output-with-hyphens to rmake format
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jun 11, 2024
1 parent cdc0840 commit a857e8e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ run-make/optimization-remarks-dir/Makefile
run-make/output-filename-conflicts-with-directory/Makefile
run-make/output-filename-overwrites-input/Makefile
run-make/output-type-permutations/Makefile
run-make/output-with-hyphens/Makefile
run-make/override-aliased-flags/Makefile
run-make/overwrite-input/Makefile
run-make/panic-abort-eh_frame/Makefile
Expand Down
8 changes: 0 additions & 8 deletions tests/run-make/output-with-hyphens/Makefile

This file was deleted.

18 changes: 18 additions & 0 deletions tests/run-make/output-with-hyphens/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Rust files with hyphens in their filename should
// not result in compiled libraries keeping that hyphen -
// it should become an underscore. Only bin executables
// should keep the hyphen. This test ensures that this rule
// remains enforced.
// See https://github.com/rust-lang/rust/pull/23786

//@ ignore-cross-compile

use run_make_support::rustc;
use std::path::Path;

fn main() {
rustc().input("foo-bar.rs").crate_type("bin").run();
Path::new(bin_name("foo-bar")).exists();
rustc().input("foo-bar.rs").crate_type("lib").run();
Path::new(bin_name("libfoo_bar.rlib")).exists();
}

0 comments on commit a857e8e

Please sign in to comment.