Skip to content

Migrate lto-linkage-used-attr, no-duplicate-libs and pgo-gen-no-imp-symbols run-make tests to rmake #127990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
rewrite lto-linkage-used-attr to rmake
  • Loading branch information
Oneirical committed Jul 22, 2024
commit 632f01306b2a5b7f47e554cf1280f5ef8fc9f710
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 @@ -47,7 +47,6 @@ run-make/link-cfg/Makefile
run-make/link-framework/Makefile
run-make/long-linker-command-lines-cmd-exe/Makefile
run-make/long-linker-command-lines/Makefile
run-make/lto-linkage-used-attr/Makefile
run-make/macos-deployment-target/Makefile
run-make/min-global-align/Makefile
run-make/native-link-modifier-bundle/Makefile
Expand Down
8 changes: 0 additions & 8 deletions tests/run-make/lto-linkage-used-attr/Makefile

This file was deleted.

14 changes: 14 additions & 0 deletions tests/run-make/lto-linkage-used-attr/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Link time optimizations (LTO) used to snip away some important symbols
// when setting optimization level to 3 or higher.
// This is an LLVM, not a rustc bug, fixed here: https://reviews.llvm.org/D145293
// This test checks that the impl_* symbols are preserved as they should.
// See https://github.com/rust-lang/rust/issues/108030

//FIXME(Oneirical): try it on more than only-x86_64-unknown-linux-gnu

use run_make_support::rustc;

fn main() {
rustc().arg("-Cdebuginfo=0").opt_level("3").input("lib.rs").run();
rustc().arg("-Clto=fat").arg("-Cdebuginfo=0").opt_level("3").input("main.rs").run();
}