Skip to content

Commit

Permalink
rewrite symbols-include-type-name to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jul 3, 2024
1 parent 7c29298 commit ffc06a4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 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 @@ -170,7 +170,6 @@ run-make/staticlib-dylib-linkage/Makefile
run-make/std-core-cycle/Makefile
run-make/symbol-mangling-hashed/Makefile
run-make/symbol-visibility/Makefile
run-make/symbols-include-type-name/Makefile
run-make/sysroot-crates-are-unstable/Makefile
run-make/target-cpu-native/Makefile
run-make/target-specs/Makefile
Expand Down
7 changes: 3 additions & 4 deletions tests/run-make/cdylib-fewer-symbols/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
// four such symbols are successfully hidden.
// See https://github.com/rust-lang/rust/pull/45710

//FIXME(Oneirical): try it on windows, restore ignore
// See https://github.com/rust-lang/rust/pull/46207#issuecomment-347561753
//FIXME(Oneirical): I also removed cross-compile ignore since there is no binary execution
//@ ignore-cross-compile
// Reason: The __rust_ symbol appears during cross-compilation.

use run_make_support::{dynamic_lib_name, llvm_readobj, rustc};

Expand All @@ -19,5 +18,5 @@ fn main() {
assert!(!&out.contains("__rdl_"));
assert!(!&out.contains("__rde_"));
assert!(!&out.contains("__rg_"));
assert!(!&out.contains("__ruse_"));
assert!(!&out.contains("__rust_"));
}
3 changes: 3 additions & 0 deletions tests/run-make/extern-flag-pathless/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
// respected.
// See https://github.com/rust-lang/rust/pull/64882

//@ ignore-cross-compile
// Reason: the compiled binary is executed

use run_make_support::{dynamic_lib_name, fs_wrapper, run, run_fail, rust_lib_name, rustc};

fn main() {
Expand Down
9 changes: 0 additions & 9 deletions tests/run-make/symbols-include-type-name/Makefile

This file was deleted.

12 changes: 12 additions & 0 deletions tests/run-make/symbols-include-type-name/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Method names used to be obfuscated when exported into symbols,
// leaving only an obscure `<impl>`. After the fix in #30328,
// this test checks that method names are successfully saved in the symbol list.
// See https://github.com/rust-lang/rust/issues/30260

use run_make_support::{invalid_utf8_contains, rustc};

fn main() {
rustc().crate_type("staticlib").emit("asm").input("lib.rs").run();
// Check that symbol names for methods include type names, instead of <impl>.
invalid_utf8_contains("lib.s", "Def");
}

0 comments on commit ffc06a4

Please sign in to comment.