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

Subtree sync for rustc_codegen_cranelift #135776

Merged
merged 16 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "nightly-2025-01-10"
channel = "nightly-2025-01-20"
components = ["rust-src", "rustc-dev", "llvm-tools"]
profile = "minimal"
5 changes: 2 additions & 3 deletions compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,11 @@ diff --git a/src/tools/run-make-support/src/rustdoc.rs b/src/tools/run-make-supp
index 9607ff02f96..b7d97caf9a2 100644
--- a/src/tools/run-make-support/src/external_deps/rustdoc.rs
+++ b/src/tools/run-make-support/src/external_deps/rustdoc.rs
@@ -34,8 +34,6 @@ pub fn bare() -> Self {
@@ -34,7 +34,6 @@ pub fn bare() -> Self {
#[track_caller]
pub fn new() -> Self {
let mut cmd = setup_common();
- let target_rpath_dir = env_var_os("TARGET_RPATH_DIR");
- cmd.arg(format!("-L{}", target_rpath_dir.to_string_lossy()));
- cmd.arg("-L").arg(env_var_os("TARGET_RPATH_DIR"));
Self { cmd }
}

Expand Down
10 changes: 9 additions & 1 deletion compiler/rustc_codegen_cranelift/src/driver/aot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,17 @@ fn make_module(sess: &Session, name: String) -> UnwindModule<ObjectModule> {

let mut builder =
ObjectBuilder::new(isa, name + ".o", cranelift_module::default_libcall_names()).unwrap();

// Disable function sections by default on MSVC as it causes significant slowdowns with link.exe.
// Maybe link.exe has exponential behavior when there are many sections with the same name? Also
// explicitly disable it on MinGW as rustc already disables it by default on MinGW and as such
// isn't tested. If rustc enables it in the future on MinGW, we can re-enable it too once it has
// been on MinGW.
let default_function_sections = sess.target.function_sections && !sess.target.is_like_windows;
builder.per_function_section(
sess.opts.unstable_opts.function_sections.unwrap_or(sess.target.function_sections),
sess.opts.unstable_opts.function_sections.unwrap_or(default_function_sections),
);

UnwindModule::new(ObjectModule::new(builder), true)
}

Expand Down
Loading