Skip to content

Rollup of 7 pull requests #128109

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

Merged
merged 19 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5824ab1
Support lists and stylings in more places for `rustc --explain`
Alexendoo Jun 26, 2024
632f013
rewrite lto-linkage-used-attr to rmake
Oneirical Jul 19, 2024
f307287
rewrite no-duplicate-libs to rmake
Oneirical Jul 19, 2024
c3d3d6f
Fix inclusion of `wasm-component-ld` in dist artifacts
alexcrichton Jul 22, 2024
6d9d605
rewrite pgo-gen-no-imp-symbols to rmake
Oneirical Jul 19, 2024
e8e6111
Migrate `run-make/link-framework` to `rmake.rs`
GuillaumeGomez Jun 24, 2024
7e0c203
Add new `MSVC_LIB_PATH` runtest environment variable to know location…
GuillaumeGomez Jun 2, 2024
b7495b4
Note closure captures when reporting deferred cast to fn ptr failed
compiler-errors Jul 23, 2024
84eee68
Add `run_make_support::build_native_static_lib` function
GuillaumeGomez Jun 2, 2024
5257ca7
Migrate `run-make/issue-15460` to `rmake.rs`
GuillaumeGomez Jun 2, 2024
3de5252
Rename `tests/run-make/issue-15460` into `tests/run-make/link-native-…
GuillaumeGomez Jun 2, 2024
d4f3673
make it possible to disable download-rustc if it's incompatible
onur-ozkan Jul 23, 2024
9d4daf8
Rollup merge of #125886 - GuillaumeGomez:migrate-run-make-issue-15460…
matthiaskrgr Jul 23, 2024
f1a29ee
Rollup merge of #126898 - GuillaumeGomez:migrate-run-make-link-framew…
matthiaskrgr Jul 23, 2024
8e206c0
Rollup merge of #126994 - Alexendoo:explain-markdown, r=tgross35
matthiaskrgr Jul 23, 2024
f34237f
Rollup merge of #127990 - Oneirical:ii-the-high-priestest, r=jieyouxu
matthiaskrgr Jul 23, 2024
417bdc7
Rollup merge of #128060 - alexcrichton:include-wasm-component-ld-for-…
matthiaskrgr Jul 23, 2024
c2ba4b1
Rollup merge of #128082 - compiler-errors:closure-cap, r=estebank
matthiaskrgr Jul 23, 2024
041b8c4
Rollup merge of #128098 - onur-ozkan:incompatible-option-behaviour, r…
matthiaskrgr Jul 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
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 @@ -41,18 +41,15 @@ run-make/libtest-thread-limit/Makefile
run-make/link-cfg/Makefile
run-make/long-linker-command-lines-cmd-exe/Makefile
run-make/long-linker-command-lines/Makefile
run-make/lto-linkage-used-attr/Makefile
run-make/macos-deployment-target/Makefile
run-make/min-global-align/Makefile
run-make/native-link-modifier-bundle/Makefile
run-make/native-link-modifier-whole-archive/Makefile
run-make/no-alloc-shim/Makefile
run-make/no-builtins-attribute/Makefile
run-make/no-duplicate-libs/Makefile
run-make/panic-abort-eh_frame/Makefile
run-make/pdb-buildinfo-cl-cmd/Makefile
run-make/pgo-gen-lto/Makefile
run-make/pgo-gen-no-imp-symbols/Makefile
run-make/pgo-indirect-call-promotion/Makefile
run-make/pointer-auth-link-with-c/Makefile
run-make/print-calling-conventions/Makefile
Expand Down
8 changes: 0 additions & 8 deletions tests/run-make/lto-linkage-used-attr/Makefile

This file was deleted.

15 changes: 15 additions & 0 deletions tests/run-make/lto-linkage-used-attr/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Link time optimizations (LTO) used to snip away some important symbols
// when setting optimization level to 3 or higher.
// This is an LLVM, not a rustc bug, fixed here: https://reviews.llvm.org/D145293
// This test checks that the impl_* symbols are preserved as they should.
// See https://github.com/rust-lang/rust/issues/108030

//@ only-x86_64-unknown-linux-gnu
// Reason: some of the inline assembly directives are architecture-specific.

use run_make_support::rustc;

fn main() {
rustc().arg("-Cdebuginfo=0").opt_level("3").input("lib.rs").run();
rustc().arg("-Clto=fat").arg("-Cdebuginfo=0").opt_level("3").input("main.rs").run();
}
11 changes: 0 additions & 11 deletions tests/run-make/no-duplicate-libs/Makefile

This file was deleted.

22 changes: 22 additions & 0 deletions tests/run-make/no-duplicate-libs/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// The rust compiler used to try to detect duplicated libraries in
// the linking order and remove the duplicates... but certain edge cases,
// such as the one presented in `foo` and `bar` in this test, demand precise
// control over the link order, including duplicates. As the anti-duplication
// filter was removed, this test should now successfully see main be compiled
// and executed.
// See https://github.com/rust-lang/rust/pull/12688

//@ ignore-cross-compile
// Reason: the compiled binary is executed

//@ ignore-msvc
// Reason: native compilation results in an unresolved external symbol

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

fn main() {
build_native_static_lib("foo");
build_native_static_lib("bar");
rustc().input("main.rs").run();
run("main");
}
11 changes: 0 additions & 11 deletions tests/run-make/pgo-gen-no-imp-symbols/Makefile

This file was deleted.

27 changes: 27 additions & 0 deletions tests/run-make/pgo-gen-no-imp-symbols/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// LLVM's profiling instrumentation adds a few symbols that are used by the profiler runtime.
// Since these show up as globals in the LLVM IR, the compiler generates dllimport-related
// __imp_ stubs for them. This can lead to linker errors because the instrumentation
// symbols have weak linkage or are in a comdat section, but the __imp_ stubs aren't.
// Since profiler-related symbols were excluded from stub-generation in #59812, this has
// been fixed, and this test checks that the llvm profile symbol appear, but without the
// anomalous __imp_ stubs.
// See https://github.com/rust-lang/rust/pull/59812

use run_make_support::{cwd, rfs, rustc};

fn main() {
rustc()
.input("test.rs")
.emit("llvm-ir")
.opt()
.codegen_units(1)
.profile_generate(cwd())
.arg("-Zno-profiler-runtime")
.run();
let out = rfs::read_to_string("test.ll");
// We expect symbols starting with "__llvm_profile_".
assert!(out.contains("__llvm_profile_"));
// We do NOT expect the "__imp_" version of these symbols.
assert!(!out.contains("__imp___llvm_profile_")); // 64 bit
assert!(!out.contains("__imp____llvm_profile_")); // 32 bit
}