Rollup merge of #139239 - jieyouxu:run-make-aux-build, r=Kobzol
Remove `aux_build` run-make rustc helpers They provide very little value and makes it more confusing than is helpful. Helps with #138066. r? `@Kobzol`
This commit is contained in:
commit
abcfc3e390
4 changed files with 5 additions and 19 deletions
|
@ -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]
|
||||
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -4,7 +4,7 @@ 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)]
|
||||
|
@ -12,7 +12,7 @@ fn main() {
|
|||
libc::umask(0o002);
|
||||
}
|
||||
|
||||
aux_build().arg("foo.rs").run();
|
||||
rustc().crate_type("lib").arg("foo.rs").run();
|
||||
verify(Path::new("libfoo.rlib"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue