about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-20 18:21:01 +0000
committerbors <bors@rust-lang.org>2024-06-20 18:21:01 +0000
commit433355166d769afc9c19f761cc7efc4d152e9a2c (patch)
tree2412ee497bc589da0ba13b9f3ccc3ec166d745bb /src/tools
parentcb8a7ea0ed866295e0f65725cea6662bea51971a (diff)
parent7b5ed5a66c7e1ec0d2d8ba3657a4048ceea36988 (diff)
downloadrust-433355166d769afc9c19f761cc7efc4d152e9a2c.tar.gz
rust-433355166d769afc9c19f761cc7efc4d152e9a2c.zip
Auto merge of #126745 - matthiaskrgr:rollup-xagplef, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #126095 (Migrate `link-args-order`, `ls-metadata` and `lto-readonly-lib` `run-make` tests to `rmake`)
 - #126629 (Migrate `run-make/compressed-debuginfo` to `rmake.rs`)
 - #126644 (Rewrite `extern-flag-rename-transitive`. `debugger-visualizer-dep-info`, `metadata-flag-frobs-symbols`, `extern-overrides-distribution` and `forced-unwind-terminate-pof` `run-make` tests to rmake)
 - #126735 (collect attrs in const block expr)
 - #126737 (Remove `feature(const_closures)` from libcore)
 - #126740 (add `needs-unwind` to UI test)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/run-make-support/src/rustc.rs18
-rw-r--r--src/tools/tidy/src/allowed_run_make_makefiles.txt9
2 files changed, 18 insertions, 9 deletions
diff --git a/src/tools/run-make-support/src/rustc.rs b/src/tools/run-make-support/src/rustc.rs
index 331e1a5ab8b..a377dad99d6 100644
--- a/src/tools/run-make-support/src/rustc.rs
+++ b/src/tools/run-make-support/src/rustc.rs
@@ -73,6 +73,12 @@ impl Rustc {
         self
     }
 
+    /// Incorporate a hashed string to mangled symbols.
+    pub fn metadata(&mut self, meta: &str) -> &mut Self {
+        self.cmd.arg(format!("-Cmetadata={meta}"));
+        self
+    }
+
     /// Add a suffix in each output filename.
     pub fn extra_filename(&mut self, suffix: &str) -> &mut Self {
         self.cmd.arg(format!("-Cextra-filename={suffix}"));
@@ -230,6 +236,12 @@ impl Rustc {
         self
     }
 
+    /// Add multiple extra arguments to the linker invocation, via `-Clink-args`.
+    pub fn link_args(&mut self, link_args: &str) -> &mut Self {
+        self.cmd.arg(format!("-Clink-args={link_args}"));
+        self
+    }
+
     /// Specify a stdin input
     pub fn stdin<I: AsRef<[u8]>>(&mut self, input: I) -> &mut Self {
         self.cmd.set_stdin(input.as_ref().to_vec().into_boxed_slice());
@@ -248,4 +260,10 @@ impl Rustc {
         self.cmd.arg(format!("-Clinker={linker}"));
         self
     }
+
+    /// Specify the linker flavor
+    pub fn linker_flavor(&mut self, linker_flavor: &str) -> &mut Self {
+        self.cmd.arg(format!("-Clinker-flavor={linker_flavor}"));
+        self
+    }
 }
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt
index 4e64181c6f5..f3241354049 100644
--- a/src/tools/tidy/src/allowed_run_make_makefiles.txt
+++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt
@@ -13,7 +13,6 @@ run-make/cdylib-fewer-symbols/Makefile
 run-make/compiler-lookup-paths-2/Makefile
 run-make/compiler-lookup-paths/Makefile
 run-make/compiler-rt-works-on-mingw/Makefile
-run-make/compressed-debuginfo/Makefile
 run-make/crate-hash-rustc-version/Makefile
 run-make/crate-name-priority/Makefile
 run-make/cross-lang-lto-clang/Makefile
@@ -21,7 +20,6 @@ run-make/cross-lang-lto-pgo-smoketest/Makefile
 run-make/cross-lang-lto-upstream-rlibs/Makefile
 run-make/cross-lang-lto/Makefile
 run-make/debug-assertions/Makefile
-run-make/debugger-visualizer-dep-info/Makefile
 run-make/dep-info-doesnt-run-much/Makefile
 run-make/dep-info-spaces/Makefile
 run-make/dep-info/Makefile
@@ -38,7 +36,6 @@ run-make/export-executable-symbols/Makefile
 run-make/extern-diff-internal-name/Makefile
 run-make/extern-flag-disambiguates/Makefile
 run-make/extern-flag-pathless/Makefile
-run-make/extern-flag-rename-transitive/Makefile
 run-make/extern-fn-explicit-align/Makefile
 run-make/extern-fn-generic/Makefile
 run-make/extern-fn-mangle/Makefile
@@ -49,10 +46,8 @@ run-make/extern-fn-with-packed-struct/Makefile
 run-make/extern-fn-with-union/Makefile
 run-make/extern-multiple-copies/Makefile
 run-make/extern-multiple-copies2/Makefile
-run-make/extern-overrides-distribution/Makefile
 run-make/extra-filename-with-temp-outputs/Makefile
 run-make/fmt-write-bloat/Makefile
-run-make/forced-unwind-terminate-pof/Makefile
 run-make/foreign-double-unwind/Makefile
 run-make/foreign-exceptions/Makefile
 run-make/foreign-rust-exceptions/Makefile
@@ -96,7 +91,6 @@ run-make/libtest-json/Makefile
 run-make/libtest-junit/Makefile
 run-make/libtest-padding/Makefile
 run-make/libtest-thread-limit/Makefile
-run-make/link-args-order/Makefile
 run-make/link-cfg/Makefile
 run-make/link-framework/Makefile
 run-make/link-path-order/Makefile
@@ -105,19 +99,16 @@ run-make/llvm-ident/Makefile
 run-make/long-linker-command-lines-cmd-exe/Makefile
 run-make/long-linker-command-lines/Makefile
 run-make/longjmp-across-rust/Makefile
-run-make/ls-metadata/Makefile
 run-make/lto-dylib-dep/Makefile
 run-make/lto-empty/Makefile
 run-make/lto-linkage-used-attr/Makefile
 run-make/lto-no-link-whole-rlib/Makefile
-run-make/lto-readonly-lib/Makefile
 run-make/lto-smoke-c/Makefile
 run-make/macos-deployment-target/Makefile
 run-make/macos-fat-archive/Makefile
 run-make/manual-link/Makefile
 run-make/many-crates-but-no-match/Makefile
 run-make/metadata-dep-info/Makefile
-run-make/metadata-flag-frobs-symbols/Makefile
 run-make/min-global-align/Makefile
 run-make/mingw-export-call-convention/Makefile
 run-make/mismatching-target-triples/Makefile