#28157 closed task (wontfix)

Upstream neersighted's patch for cross-compiling Rust for Windows

Reported by: gk Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: GeorgKoppen201810
Cc: alexcrichton, manish.earth Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

neersighted's Rust patch for cross-compiling Rust for Windows which we ship (https://gitweb.torproject.org/builders/tor-browser-build.git/tree/projects/rust/unwind.patch?h=maint-8.0) is working for us and we should upstream it.

Child Tickets

Change History (5)

comment:2 Changed 10 months ago by alexcrichton

As an update here, I've been commenting (https://github.com/rust-lang/rust/pull/55444#issuecomment-434015059) on that PR, but unfortunately this patch I don't think we can land upstream because it doesn't really produce a workable target (panics don't run destructors).

For Tor though how much of this actually matters? I was under the impression that Firefox compiles with -C panic=abort which would bypass the exception runtime anyway. Does tor also do that or intentionally not do that? (or accidentally forget to pass a flag that does that?) Or does -C panic=abort still have linking issues?

comment:3 Changed 10 months ago by alexcrichton

Oh it looks like there's a project in the Rust community which has a script - https://github.com/rust-embedded/cross/blob/master/docker/mingw.sh - which compiles a mingw with dwarf exception support? That may also be useful here!

comment:4 in reply to:  2 Changed 10 months ago by gk

Replying to alexcrichton:

As an update here, I've been commenting (https://github.com/rust-lang/rust/pull/55444#issuecomment-434015059) on that PR, but unfortunately this patch I don't think we can land upstream because it doesn't really produce a workable target (panics don't run destructors).

For Tor though how much of this actually matters? I was under the impression that Firefox compiles with -C panic=abort which would bypass the exception runtime anyway. Does tor also do that or intentionally not do that? (or accidentally forget to pass a flag that does that?) Or does -C panic=abort still have linking issues?

Firefox is fine. The problem is that we don't get a properly functioning rust compiler compiled for the i686 mingw target due to the exception handling issue (compiling with panic=abort does not work and panic=unwind is broken as well). See: #26329 and #25894 for more context. And we build the compiler from source partly because we expected that we needed to deal with issues like #26475. :)

Last edited 10 months ago by gk (previous) (diff)

comment:5 in reply to:  3 Changed 10 months ago by gk

Resolution: wontfix
Status: newclosed

Replying to alexcrichton:

Oh it looks like there's a project in the Rust community which has a script - https://github.com/rust-embedded/cross/blob/master/docker/mingw.sh - which compiles a mingw with dwarf exception support? That may also be useful here!

I agree and I agree with the reasoning for not upstreaming the patch. I opened #28240 for thinking about compiling with dwarf exception support.

However, we plan to switch to a new mingw-w64/clang-based toolchain soon (see: #28238), to be able to compile Stylo for Windows. That in turn might influence what we need to do in #28240, so we'll wait with work on the latter until the former landed. Thanks! Closing this ticket as WONTFIX then.

Note: See TracTickets for help on using tickets.