Skip to content

Remove aux_build run-make rustc helpers #139239

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 2 commits into from
Apr 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 0 additions & 14 deletions src/tools/run-make-support/src/external_deps/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ pub fn bare_rustc() -> Rustc {
Rustc::bare()
}

/// Construct a new `rustc` aux-build invocation.
#[track_caller]
pub fn aux_build() -> Rustc {
Rustc::new_aux_build()
}

/// A `rustc` invocation builder.
#[derive(Debug)]
#[must_use]
Expand Down Expand Up @@ -67,14 +61,6 @@ impl Rustc {
Self { cmd }
}

/// Construct a new `rustc` invocation with `aux_build` preset (setting `--crate-type=lib`).
#[track_caller]
pub fn new_aux_build() -> Self {
let mut cmd = setup_common();
cmd.arg("--crate-type=lib");
Self { cmd }
}

// Argument provider methods

/// Configure the compilation environment.
Expand Down
2 changes: 1 addition & 1 deletion src/tools/run-make-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub use llvm::{
LlvmFilecheck, LlvmNm, LlvmObjcopy, LlvmObjdump, LlvmProfdata, LlvmReadobj,
};
pub use python::python_command;
pub use rustc::{aux_build, bare_rustc, rustc, rustc_path, Rustc};
pub use rustc::{bare_rustc, rustc, rustc_path, Rustc};
pub use rustdoc::{rustdoc, Rustdoc};

/// [`diff`][mod@diff] is implemented in terms of the [similar] library.
Expand Down
4 changes: 2 additions & 2 deletions tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// Check that the `CURRENT_RUSTC_VERSION` placeholder is correctly replaced by the current
// `rustc` version and the `since` property in feature stability gating is properly respected.

use run_make_support::{aux_build, rfs, rustc, source_root};
use run_make_support::{rfs, rustc, source_root};

fn main() {
aux_build().input("stable.rs").emit("metadata").run();
rustc().crate_type("lib").input("stable.rs").emit("metadata").run();

let output =
rustc().input("main.rs").emit("metadata").extern_("stable", "libstable.rmeta").run();
Expand Down
4 changes: 2 additions & 2 deletions tests/run-make/issue-107495-archive-permissions/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ use std::path::Path;

#[cfg(unix)]
use run_make_support::libc;
use run_make_support::{aux_build, rfs};
use run_make_support::{rfs, rustc};

fn main() {
#[cfg(unix)]
unsafe {
libc::umask(0o002);
}

aux_build().arg("foo.rs").run();
rustc().crate_type("lib").arg("foo.rs").run();
verify(Path::new("libfoo.rlib"));
}

Expand Down
Loading