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

rust: update to 1.65.0 #13921

Merged
merged 4 commits into from
Nov 7, 2022
Merged

rust: update to 1.65.0 #13921

merged 4 commits into from
Nov 7, 2022

Conversation

filnet
Copy link
Contributor

@filnet filnet commented Nov 4, 2022

No description provided.

@filnet filnet changed the title rust: update to 1.64.0 rust: update to 1.65.0 Nov 4, 2022
@jeremyd2019
Copy link
Member

@mati865 now it's time for me to ask what I was wondering when clangarm64 was enabled: what is the plan for building it moving forward? Turning off _bootstrapping and using the existing package (assuming we're always upgrading from an allowed version)? Are you going to be updating your stage0 for new versions? Or (hopefully) upstream will be adding them to their official list?

@mati865
Copy link
Collaborator

mati865 commented Nov 4, 2022

Turning off _bootstrapping and using the existing package (assuming we're always upgrading from an allowed version)?

Previously this used to be problematic because you always needed N-1 version to build N version. So You could build 1.65 using 1.64 but not rebuild 1.65 using 1.65. I think nowadays you can use N-1 or N though.
If that is the case then this would be preferred solution.

Are you going to be updating your stage0 for new versions?

No problem for me.

Or (hopefully) upstream will be adding them to their official list?

The only problem here is getting machines where that would run. Unlike many other projects Rust builds each commit for every target/host that is enabled to build them. So it needs a lot of relatively fast runners and currently they are already struggling.

@jeremyd2019
Copy link
Member

Yeah, windows arm64 runners are an issue 😬

@lazka
Copy link
Member

lazka commented Nov 4, 2022

So, OK to merge?

@jeremyd2019
Copy link
Member

I expect clangarm64 needs more work before it would build. I didn't see the patches for it updated here, so they most likely won't apply.

@lazka
Copy link
Member

lazka commented Nov 4, 2022

oh, I see

@lazka
Copy link
Member

lazka commented Nov 4, 2022

(We could also create a arm64 specific pkgbase of this, so it can be updated at a different pace?)

they apply now, but totally untested
@jeremyd2019
Copy link
Member

jeremyd2019 commented Nov 5, 2022

The stage0.json hunk will either need to be updated with a new build from @mati865, or else drop it and switch _bootstrapping=no for arm64 to use the existing packaged rust to build the new version. I'm thinking I'll try the latter and see what happens.

@jeremyd2019
Copy link
Member

jeremyd2019 commented Nov 5, 2022

switch _bootstrapping=no for arm64 to use the existing packaged rust to build the new version. I'm thinking I'll try the latter and see what happens.

Getting an error LLVM ERROR: dwo only supported with ELF and Wasm. I turned up rust-lang/rust#101071, and a TODO comment about windows-gnu

Either this, or we'll need to continue to inject new stage0 packages
during rust updates.  I left the patch and code to do that in place for
now in case that turns out to be necessary or desirable.
@mati865
Copy link
Collaborator

mati865 commented Nov 5, 2022

We should probably add the same two lines that are under Todo in gnu targets spec to gnullvm targets spec.

@lazka lazka marked this pull request as draft November 5, 2022 12:29
@jeremyd2019
Copy link
Member

I've got a build running with the following patch. It's gotten further than the last run.

--- rustc-1.65.0-src/compiler/rustc_target/src/spec/windows_gnullvm_base.rs.ori2022-11-02 14:36:24.000000000 +0000
+++ rustc-1.65.0-src/compiler/rustc_target/src/spec/windows_gnullvm_base.rs    2022-11-05 20:16:01.345559900 +0000
@@ -1,4 +1,5 @@
-use crate::spec::{cvs, LinkerFlavor, TargetOptions};
+use crate::spec::{cvs, DebuginfoKind, LinkerFlavor, SplitDebuginfo, TargetOptions};
+use std::borrow::Cow;

 pub fn opts() -> TargetOptions {
     // We cannot use `-nodefaultlibs` because compiler-rt has to be passed
@@ -34,7 +35,10 @@
         eh_frame_header: false,
         no_default_libraries: false,
         has_thread_local: true,
-
+        // FIXME(davidtwco): Support Split DWARF on Windows GNU - may require LLVM changes to
+        // output DWO, despite using DWARF, doesn't use ELF..
+        debuginfo_kind: DebuginfoKind::Pdb,
+        supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
         ..Default::default()
     }
 }

@jeremyd2019
Copy link
Member

clangarm64 built successfully with that patch. I'll leave it to @mati865 to send it upstream, I imagine there are a few of the fixes for gnullvm that need to be sent.

@mati865
Copy link
Collaborator

mati865 commented Nov 6, 2022

Yeah, windows arm64 runners are an issue 😬

I don't think it's the problem. AFAIK Rust had special runners provided by Microsoft for a long time. The problem is more about getting more runners.

clangarm64 built successfully with that patch. I'll leave it to @mati865 to send it upstream, I imagine there are a few of the fixes for gnullvm that need to be sent.

I'm sending them separately (some are already sent) so you can go ahead and open PR.

@jeremyd2019 jeremyd2019 marked this pull request as ready for review November 6, 2022 19:40
@lazka lazka merged commit e555f51 into msys2:master Nov 7, 2022
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 7, 2022
fix debuginfo for windows_gnullvm_base.rs

These lines (including the FIXME comment) were added to windows_gnu_base.rs in cf2c492 but windows_gnullvm_base.rs was not updated.  This resulted in an error `LLVM ERROR: dwo only supported with ELF and Wasm` attempting to build on aarch64-pc-windows-gnullvm.

See also msys2/MINGW-packages#13921 (comment)

/cc `@mati865` `@davidtwco`

r? `@davidtwco`
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 7, 2022
fix debuginfo for windows_gnullvm_base.rs

These lines (including the FIXME comment) were added to windows_gnu_base.rs in cf2c492 but windows_gnullvm_base.rs was not updated.  This resulted in an error `LLVM ERROR: dwo only supported with ELF and Wasm` attempting to build on aarch64-pc-windows-gnullvm.

See also msys2/MINGW-packages#13921 (comment)

/cc ``@mati865`` ``@davidtwco``

r? ``@davidtwco``
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Nov 8, 2022
fix debuginfo for windows_gnullvm_base.rs

These lines (including the FIXME comment) were added to windows_gnu_base.rs in cf2c492 but windows_gnullvm_base.rs was not updated.  This resulted in an error `LLVM ERROR: dwo only supported with ELF and Wasm` attempting to build on aarch64-pc-windows-gnullvm.

See also msys2/MINGW-packages#13921 (comment)

/cc ```@mati865``` ```@davidtwco```

r? ```@davidtwco```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants