diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-05-30 01:12:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-30 01:12:37 +0200 |
| commit | a34d0f13705c1624fe6eef4f2dc643d32e5940d7 (patch) | |
| tree | c69fff942dc2c9c1411a982fb234a17e483070ef /src | |
| parent | 849ccc8632894caf71813a9d1f30364b44e2c959 (diff) | |
| parent | 301d7229f706cbb95e78cd2319148bcbf22d80a1 (diff) | |
| download | rust-a34d0f13705c1624fe6eef4f2dc643d32e5940d7.tar.gz rust-a34d0f13705c1624fe6eef4f2dc643d32e5940d7.zip | |
Rollup merge of #125723 - GuillaumeGomez:migrate-run-make-crate-data-smoke, r=jieyouxu
Migrate `run-make/crate-data-smoke` to `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. r? ``@jieyouxu``
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/run-make-support/src/lib.rs | 8 | ||||
| -rw-r--r-- | src/tools/run-make-support/src/rustc.rs | 2 | ||||
| -rw-r--r-- | src/tools/tidy/src/allowed_run_make_makefiles.txt | 1 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs index a75d036d31f..0cf64db6ac9 100644 --- a/src/tools/run-make-support/src/lib.rs +++ b/src/tools/run-make-support/src/lib.rs @@ -135,7 +135,13 @@ pub fn dynamic_lib_name(name: &str) -> String { /// Construct a path to a rust library (rlib) under `$TMPDIR` given the library name. This will return a /// path with `$TMPDIR` joined with the library name. pub fn rust_lib(name: &str) -> PathBuf { - tmp_dir().join(format!("lib{name}.rlib")) + tmp_dir().join(rust_lib_name(name)) +} + +/// Generate the name a rust library (rlib) would have. If you want the complete path, use +/// [`rust_lib`] instead. +pub fn rust_lib_name(name: &str) -> String { + format!("lib{name}.rlib") } /// Construct the binary name based on platform. diff --git a/src/tools/run-make-support/src/rustc.rs b/src/tools/run-make-support/src/rustc.rs index 5dde0f91fea..8b0252b8f04 100644 --- a/src/tools/run-make-support/src/rustc.rs +++ b/src/tools/run-make-support/src/rustc.rs @@ -211,7 +211,7 @@ impl Rustc { /// Get the [`Output`] of the finished process. #[track_caller] - pub fn command_output(&mut self) -> ::std::process::Output { + pub fn command_output(&mut self) -> Output { // let's make sure we piped all the input and outputs self.cmd.stdin(Stdio::piped()); self.cmd.stdout(Stdio::piped()); diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index ab8367b2247..009200aca15 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -22,7 +22,6 @@ run-make/compiler-lookup-paths/Makefile run-make/compiler-rt-works-on-mingw/Makefile run-make/compressed-debuginfo/Makefile run-make/const_fn_mir/Makefile -run-make/crate-data-smoke/Makefile run-make/crate-hash-rustc-version/Makefile run-make/crate-name-priority/Makefile run-make/cross-lang-lto-clang/Makefile |
