Skip to content

Rollup of 9 pull requests #125437

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

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2c1d12c
rewrite emit test
Oneirical May 21, 2024
28894e9
rewrite bare-outfile test
Oneirical May 21, 2024
f49ff94
rewrite mixing-formats test
Oneirical May 21, 2024
fc76015
Migrate `run-make/rustdoc-scrape-examples-macros` to `rmake.rs`
GuillaumeGomez May 22, 2024
72968e5
Rename `FrameworkOnlyWindows` to `RawDylibOnlyWindows`
tbu- May 22, 2024
8369dbb
Use correct param-env in MissingCopyImplementations
compiler-errors May 22, 2024
c24d1c7
Rewrite `core-no-oom-handling` as rmake.rs
Oneirical May 22, 2024
d4e5426
rewrite and rename `issue-24445` to rmake
Oneirical May 22, 2024
f377ea1
rewrite issue-30063
Oneirical May 17, 2024
dd7e68b
rewrite and rename issue-53964
Oneirical May 17, 2024
ae49dbe
Cleanup: Fix up some diagnostics
fmease May 17, 2024
4e37db5
Remove some allowed-makefiles
Oneirical May 21, 2024
ec1786c
rewrite pgo-branch-weights (1/2)
Oneirical May 15, 2024
1f17e27
Rewrite and rename `issue-38237` to rmake
Oneirical May 22, 2024
67179cf
Rollup merge of #125165 - Oneirical:pgo-branch-weights, r=jieyouxu
matthiaskrgr May 23, 2024
b5d2bfa
Rollup merge of #125210 - fmease:fix-up-some-diags, r=davidtwco
matthiaskrgr May 23, 2024
ffc4d96
Rollup merge of #125224 - Oneirical:sixth, r=jieyouxu
matthiaskrgr May 23, 2024
ef035c1
Rollup merge of #125227 - Oneirical:seventh, r=jieyouxu
matthiaskrgr May 23, 2024
026b144
Rollup merge of #125383 - Oneirical:bundle-them-up, r=jieyouxu
matthiaskrgr May 23, 2024
428bc4a
Rollup merge of #125401 - GuillaumeGomez:migrate-rustdoc-scrape-examp…
matthiaskrgr May 23, 2024
9904454
Rollup merge of #125409 - tbu-:pr_raw_dylib_only_windows, r=lcnr
matthiaskrgr May 23, 2024
01a1248
Rollup merge of #125416 - compiler-errors:param-env-missing-copy, r=lcnr
matthiaskrgr May 23, 2024
df7acab
Rollup merge of #125421 - Oneirical:bundle-them-yet-again, r=jieyouxu
matthiaskrgr May 23, 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
8 changes: 8 additions & 0 deletions src/tools/run-make-support/src/cc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ impl Cc {
self
}

/// Adds directories to the list that the linker searches for libraries.
/// Equivalent to `-L`.
pub fn library_search_path<P: AsRef<Path>>(&mut self, path: P) -> &mut Self {
self.cmd.arg("-L");
self.cmd.arg(path.as_ref());
self
}

/// Specify `-o` or `-Fe`/`-Fo` depending on platform/compiler. This assumes that the executable
/// is under `$TMPDIR`.
pub fn out_exe(&mut self, name: &str) -> &mut Self {
Expand Down
9 changes: 8 additions & 1 deletion src/tools/run-make-support/src/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,20 @@ impl Rustc {
self
}

/// Add a directory to the library search path. Equivalent to `-L`` in rustc.
/// Add a directory to the library search path. Equivalent to `-L` in rustc.
pub fn library_search_path<P: AsRef<Path>>(&mut self, path: P) -> &mut Self {
self.cmd.arg("-L");
self.cmd.arg(path.as_ref());
self
}

/// Override the system root. Equivalent to `--sysroot` in rustc.
pub fn sysroot<P: AsRef<Path>>(&mut self, path: P) -> &mut Self {
self.cmd.arg("--sysroot");
self.cmd.arg(path.as_ref());
self
}

/// Specify the edition year.
pub fn edition(&mut self, edition: &str) -> &mut Self {
self.cmd.arg("--edition");
Expand Down
3 changes: 0 additions & 3 deletions src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ run-make/compiler-rt-works-on-mingw/Makefile
run-make/compressed-debuginfo/Makefile
run-make/const-prop-lint/Makefile
run-make/const_fn_mir/Makefile
run-make/core-no-oom-handling/Makefile
run-make/crate-data-smoke/Makefile
run-make/crate-hash-rustc-version/Makefile
run-make/crate-name-priority/Makefile
Expand Down Expand Up @@ -96,7 +95,6 @@ run-make/issue-15460/Makefile
run-make/issue-18943/Makefile
run-make/issue-20626/Makefile
run-make/issue-22131/Makefile
run-make/issue-24445/Makefile
run-make/issue-25581/Makefile
run-make/issue-26006/Makefile
run-make/issue-26092/Makefile
Expand All @@ -106,7 +104,6 @@ run-make/issue-35164/Makefile
run-make/issue-36710/Makefile
run-make/issue-37839/Makefile
run-make/issue-37893/Makefile
run-make/issue-38237/Makefile
run-make/issue-40535/Makefile
run-make/issue-46239/Makefile
run-make/issue-47384/Makefile
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/alloc-no-oom-handling/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This test checks that alloc can still compile correctly
// This test checks that alloc can still compile successfully
// when the unstable no_global_oom_handling feature is turned on.
// See https://github.com/rust-lang/rust/pull/84266

Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/alloc-no-rc/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This test checks that alloc can still compile correctly
// This test checks that alloc can still compile successfully
// when the unstable no_rc feature is turned on.
// See https://github.com/rust-lang/rust/pull/84266

Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/alloc-no-sync/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This test checks that alloc can still compile correctly
// This test checks that alloc can still compile successfully
// when the unstable no_sync feature is turned on.
// See https://github.com/rust-lang/rust/pull/84266

Expand Down
6 changes: 0 additions & 6 deletions tests/run-make/core-no-oom-handling/Makefile

This file was deleted.

16 changes: 16 additions & 0 deletions tests/run-make/core-no-oom-handling/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This test checks that the core library can still compile successfully
// when the no_global_oom_handling feature is turned on.
// See https://github.com/rust-lang/rust/pull/110649

use run_make_support::{rustc, tmp_dir};

fn main() {
rustc()
.edition("2021")
.arg("-Dwarnings")
.crate_type("rlib")
.input("../../../library/core/src/lib.rs")
.sysroot(tmp_dir().join("fakeroot"))
.cfg("no_global_oom_handling")
.run();
}
16 changes: 16 additions & 0 deletions tests/run-make/deref-impl-rustdoc-ice/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// A very specific set of circumstances (mainly, implementing Deref, and
// having a procedural macro and a Debug derivation in external crates) caused
// an internal compiler error (ICE) when trying to use rustdoc. This test
// reproduces the exact circumstances which caused the bug and checks
// that it does not happen again.
// See https://github.com/rust-lang/rust/issues/38237

//@ ignore-cross-compile

use run_make_support::{rustc, rustdoc, tmp_dir};

fn main() {
rustc().input("foo.rs").run();
rustc().input("bar.rs").run();
rustdoc().input("baz.rs").library_search_path(tmp_dir()).output(tmp_dir()).run();
}
11 changes: 0 additions & 11 deletions tests/run-make/issue-24445/Makefile

This file was deleted.

6 changes: 0 additions & 6 deletions tests/run-make/issue-38237/Makefile

This file was deleted.

34 changes: 34 additions & 0 deletions tests/run-make/non-pie-thread-local/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// It was once required to use a position-independent executable (PIE)
// in order to use the thread_local! macro, or some symbols would contain
// a NULL address. This was fixed, and this test checks a non-PIE, then a PIE
// build to see if this bug makes a resurgence.
// See https://github.com/rust-lang/rust/pull/24448

//@ ignore-cross-compile
//@ only-linux

use run_make_support::{cc, run, rustc, tmp_dir};

fn main() {
rustc().input("foo.rs").run();
cc().input("foo.c")
.arg("-lfoo")
.library_search_path(tmp_dir())
.arg("-Wl,--gc-sections")
.arg("-lpthread")
.arg("-ldl")
.out_exe("foo")
.run();
run("foo");
cc().input("foo.c")
.arg("-lfoo")
.library_search_path(tmp_dir())
.arg("-Wl,--gc-sections")
.arg("-lpthread")
.arg("-ldl")
.arg("-pie")
.arg("-fPIC")
.out_exe("foo")
.run();
run("foo");
}