Skip to content

Migrate run-make/issue-14500 to new rmake.rs format #125047

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 4 commits into from
May 14, 2024
Merged
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
Prev Previous commit
Next Next commit
make tidy happy
  • Loading branch information
Oneirical committed May 12, 2024
commit a1b5ea0cc220d11b831f49a92c2e37b31ae928d3
13 changes: 4 additions & 9 deletions tests/run-make/issue-14500/rmake.rs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take the opportunity to rename this test to something that's not as opaque as issue-14500. Maybe reachable-extern-fn-available-lto?

Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,14 @@ use run_make_support::{cc, extra_c_flags, run, rustc};

fn main() {
let libbar_path = tmp_dir().join("libbar.a");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't recall exactly, do we have a static library name helper? If not, can you add one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already one! I should use it.

rustc().input("foo.rs")
.crate_type("rlib")
.run();
rustc().input("bar.rs")
rustc().input("foo.rs").crate_type("rlib").run();
rustc()
.input("bar.rs")
.static_lib("staticlib")
.codegen_option("lto")
.library_search_path(".")
.output(&libbar_path)
.run();
cc().input("foo.c")
.input(libbar_path)
.args(&extra_c_flags())
.out_exe("foo")
.run();
cc().input("foo.c").input(libbar_path).args(&extra_c_flags()).out_exe("foo").run();
run("foo");
}
Loading