Skip to content
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

Rollup of 9 pull requests #126714

Closed
wants to merge 32 commits into from
Closed
Changes from 6 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a183989
Only check locally for reported errors
oli-obk Jun 17, 2024
fa2b612
Rewrite link-args-order to rmake
Oneirical Jun 6, 2024
594135e
Rewrite ls-metadata to rmake
Oneirical Jun 6, 2024
03a4259
Rewrite lto-readonly-lib to rmake
Oneirical Jun 6, 2024
62431b7
Migrate `run-make/compressed-debuginfo` to `rmake.rs`
GuillaumeGomez Jun 18, 2024
060a13e
rewrite extern-flag-rename-transitive to rmake
Oneirical Jun 18, 2024
9e2ace8
rewrite debugger-visualizer-dep-info to rmake
Oneirical Jun 18, 2024
dff354e
rewrite metadata-flag-frobs-symbols to rmake
Oneirical Jun 18, 2024
d1e8c6b
rewrite extern-overrides-distribution to rmake
Oneirical Jun 18, 2024
ec88615
Rename a bunch of things
compiler-errors Jun 18, 2024
3594a19
Taint infcx when reporting errors
oli-obk Jun 17, 2024
1cb75dc
Remove a hack that isn't needed anymore
oli-obk Jun 17, 2024
2e7e4ef
rewrite unknown-mod-stdin to rmake
Oneirical Jun 19, 2024
e4c9a8c
Const generic parameters aren't bounds, even if we end up erroring be…
oli-obk Jun 19, 2024
4226a50
rewrite and slightly rename issue-68794-textrel-on-minimal-lib
Oneirical Jun 19, 2024
e64e326
rewrite raw-dylib-cross-compilation to rmake
Oneirical Jun 19, 2024
b3c5132
make assert_stderr_contains print its contents on panic
Oneirical Jun 9, 2024
4630d1b
Ban `ArrayToPointer` and `MutToConstPointer` from runtime MIR
scottmcm Jun 12, 2024
e04e351
`bug!` more uses of these in runtime stuff
scottmcm Jun 15, 2024
95e214d
reword the hint::blackbox non-guarantees
the8472 Jun 19, 2024
445eb08
rewrite used-cdylib-macos to rmake
Oneirical Jun 19, 2024
e7ea063
rewrite forced-unwind-terminate-pof to rmake
Oneirical Jun 18, 2024
f44494c
Migrate `run-make/comment-section` to `rmake.rs`
Rejyr Jun 16, 2024
ee9bbe0
Rollup merge of #126095 - Oneirical:final-testination, r=jieyouxu
jieyouxu Jun 19, 2024
fce857c
Rollup merge of #126308 - scottmcm:ban-some-coercions, r=saethlin
jieyouxu Jun 19, 2024
58db9d0
Rollup merge of #126534 - Rejyr:comment-section-migration, r=jieyouxu
jieyouxu Jun 19, 2024
53ecfe7
Rollup merge of #126620 - oli-obk:taint_errors, r=fee1-dead
jieyouxu Jun 19, 2024
c16151b
Rollup merge of #126629 - GuillaumeGomez:migrate-run-make-compressed-…
jieyouxu Jun 19, 2024
ba87c6d
Rollup merge of #126644 - Oneirical:testla-coil, r=jieyouxu
jieyouxu Jun 19, 2024
d2f4818
Rollup merge of #126650 - compiler-errors:renames, r=lcnr
jieyouxu Jun 19, 2024
8ab85a4
Rollup merge of #126698 - Oneirical:tessteract, r=jieyouxu
jieyouxu Jun 19, 2024
efbbec7
Rollup merge of #126703 - the8472:on-blackbox-crypto-use, r=scottmcm
jieyouxu Jun 19, 2024
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
6 changes: 6 additions & 0 deletions src/tools/run-make-support/src/rustc.rs
Original file line number Diff line number Diff line change
@@ -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}"));
5 changes: 0 additions & 5 deletions src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
@@ -20,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
@@ -37,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
@@ -48,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
@@ -113,7 +109,6 @@ 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
9 changes: 0 additions & 9 deletions tests/run-make/debugger-visualizer-dep-info/Makefile

This file was deleted.

11 changes: 11 additions & 0 deletions tests/run-make/debugger-visualizer-dep-info/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This test checks that files referenced via #[debugger_visualizer] are
// included in `--emit dep-info` output.
// See https://github.com/rust-lang/rust/pull/111641

use run_make_support::{invalid_utf8_contains, rustc};

fn main() {
rustc().emit("dep-info").input("main.rs").run();
invalid_utf8_contains("main.d", "foo.py");
invalid_utf8_contains("main.d", "my_visualizers/bar.natvis");
}
7 changes: 0 additions & 7 deletions tests/run-make/extern-flag-rename-transitive/Makefile

This file was deleted.

14 changes: 14 additions & 0 deletions tests/run-make/extern-flag-rename-transitive/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// In this test, baz.rs is looking for an extern crate "a" which
// does not exist, and can only run through the --extern rustc flag
// defining that the "a" crate is in fact just "foo". This test
// checks that the --extern flag takes precedence over the extern
// crate statement in the code.
// See https://github.com/rust-lang/rust/pull/52723

use run_make_support::{rust_lib_name, rustc};

fn main() {
rustc().input("foo.rs").run();
rustc().input("bar.rs").run();
rustc().input("baz.rs").extern_("a", rust_lib_name("foo")).run();
}
6 changes: 0 additions & 6 deletions tests/run-make/extern-overrides-distribution/Makefile

This file was deleted.

14 changes: 14 additions & 0 deletions tests/run-make/extern-overrides-distribution/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// The --extern flag should override any "crate_type" declarations in the
// Rust files themselves. In this test, libc is compiled as "lib", but
// main.rs will only run with an rlib, which checks if the --extern flag
// is successfully overriding the default behaviour.
// See https://github.com/rust-lang/rust/pull/21782

//@ ignore-cross-compile

use run_make_support::{rust_lib_name, rustc};

fn main() {
rustc().input("libc.rs").metadata("foo").run();
rustc().input("main.rs").extern_("libc", rust_lib_name("libc")).run();
}
9 changes: 0 additions & 9 deletions tests/run-make/forced-unwind-terminate-pof/Makefile

This file was deleted.

16 changes: 16 additions & 0 deletions tests/run-make/forced-unwind-terminate-pof/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// During a forced unwind, crossing the non-Plain Old Frame
// would define the forced unwind as undefined behaviour, and
// immediately abort the unwinding process. This test checks
// that the forced unwinding takes precedence.
// See https://github.com/rust-lang/rust/issues/101469

//@ ignore-cross-compile
//@ ignore-windows
//Reason: pthread (POSIX threads) is not available on Windows

use run_make_support::{run, rustc};

fn main() {
rustc().input("foo.rs").run();
run("foo").assert_stdout_not_contains("cannot unwind");
}
11 changes: 0 additions & 11 deletions tests/run-make/metadata-flag-frobs-symbols/Makefile

This file was deleted.

20 changes: 20 additions & 0 deletions tests/run-make/metadata-flag-frobs-symbols/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// In this test, foo.rs is compiled twice with different hashes tied to its
// symbols thanks to the metadata flag. bar.rs then ensures that the memory locations
// of foo's symbols are different even though they came from the same original source code.
// This checks that the metadata flag is doing its job.
// See https://github.com/rust-lang/rust/issues/14471

//@ ignore-cross-compile

use run_make_support::{run, rust_lib_name, rustc};

fn main() {
rustc().input("foo.rs").metadata("a").extra_filename("-a").run();
rustc().input("foo.rs").metadata("b").extra_filename("-b").run();
rustc()
.input("bar.rs")
.extern_("foo1", rust_lib_name("foo-a"))
.extern_("foo2", rust_lib_name("foo-b"))
.run();
run("bar");
}