Opened 2 years ago

Closed 14 months ago

#21777 closed project (fixed)

Investigate cross-compiling Tor Browser for Windows with clang-cl

Reported by: gk Owned by: tbb-team
Priority: High Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-rbm, ff60-esr, TorBrowserTeam201803, GeorgKoppen201804
Cc: tom, dcf Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

It seems using clang-cl for cross-compiling Tor Browser for Windows gets closer and closer to be a real alternative. The Chrome bug is: https://bugs.chromium.org/p/chromium/issues/detail?id=495204 and has some information for starters.

Child Tickets

Change History (18)

comment:1 Changed 21 months ago by gk

Keywords: tbb-rbm added; tbb-gitian removed

Moving over to rbm

comment:2 Changed 18 months ago by gk

Keywords: ff59-esr GeorgKoppen201712 TorBrowserTeam201712 added
Priority: MediumHigh

The Google people made this work, so we have an alternative road to the mingw-w64/clang setup we could try.

Tracking LLVM master causes still issues sometimes (https://bugs.chromium.org/p/chromium/issues/detail?id=781873) but they get resolved pretty fast it seems.

comment:4 in reply to:  2 Changed 18 months ago by cypherpunks

Replying to gk:

The Google people made this work, so we have an alternative road to the mingw-w64/clang setup we could try.

from Martin:

Yes, the clang/llvm based toolchain is much less mature in all aspects, so
I wouldn't recommend it unless you have interest in it for another reason
(my reason is support for windows on non-x86 platforms).

or you're talking not about mingw-w64 actually?

Last edited 18 months ago by cypherpunks (previous) (diff)

comment:5 Changed 17 months ago by gk

Keywords: GeorgKoppen201801 added; GeorgKoppen201712 removed

Moving my tickets to 2018

comment:6 Changed 17 months ago by gk

Keywords: TorBrowserTeam201801 added; TorBrowserTeam201712 removed

Moving tickets to 2018.

comment:7 Changed 16 months ago by gk

Keywords: ff60-esr added; ff59-esr removed

Firefox 60 is the new ESR.

comment:8 Changed 16 months ago by gk

Keywords: GeorgKoppen201802 added; GeorgKoppen201801 removed

Moving my tickets to Feb.

comment:9 Changed 16 months ago by gk

Keywords: TorBrowserTeam201802 added; TorBrowserTeam201801 removed

Moving tickets to Feb

comment:10 Changed 15 months ago by gk

For those following along at home: https://bugzilla.mozilla.org/show_bug.cgi?id=1390583 has all the details. So far I've been able to cross-compile our ESR52-based Tor Browser code in a similar setup to the one we use for our shipped bundles and the result is running on a Windows 8 system.

comment:11 in reply to:  10 ; Changed 15 months ago by cypherpunks

Replying to gk:

For those following along at home:

ROFL :D Who are those? Reply here, folks!

https://bugzilla.mozilla.org/show_bug.cgi?id=1390583 has all the details.

Those, who follow, already know you spamming that Bugzilla ticket :)

So far I've been able to cross-compile our ESR52-based Tor Browser code in a similar setup to the one we use for our shipped bundles

It seems, x86_64-w64-mingw32/ucrt/lld/clang (not -cl ;) ) is not similar to stable win32 builds. ;)

and the result is running on a Windows 8 system.

Why win 8? :)
(BTW, Tom ni you about debugging on win)

comment:12 in reply to:  11 Changed 15 months ago by cypherpunks

Replying to cypherpunks:

ROFL :D Who are those?

Everyone who hopes that Stylo will make it into the next TB release so that we don't have to wait yet another year just to get some decent speed boost.

comment:13 in reply to:  10 Changed 15 months ago by cypherpunks

Replying to gk:

For those following along at home: https://bugzilla.mozilla.org/show_bug.cgi?id=1390583 has all the details.

Why don't you file your findings under https://bugzilla.mozilla.org/show_bug.cgi?id=1257268 to allow Mozillians to work on them in parallel?

comment:14 Changed 15 months ago by gk

Keywords: GeorgKoppen201803 added; GeorgKoppen201802 removed

Moving my tickets to March.

comment:15 Changed 15 months ago by gk

Keywords: TorBrowserTeam201803 added; TorBrowserTeam201802 removed

Adding to our March plate.

comment:16 Changed 14 months ago by gk

Keywords: GeorgKoppen201804 added; GeorgKoppen201803 removed

Moving my tickets to April 2018

comment:17 Changed 14 months ago by dcf

Cc: dcf added

Copying myself because we're likely to want to use this clang-cl for cross-compiling libwebrtc too, in #25483.

comment:18 Changed 14 months ago by gk

Resolution: fixed
Status: newclosed

I think this investigation is done. As I said in comment:10 https://bugzilla.mozilla.org/show_bug.cgi?id=1390583 has the details and in general cross-compiling Firefox with clang/mingw-w64 is working for our purposes. For details on how to set this toolchain up, see: https://lists.torproject.org/pipermail/tbb-dev/2018-March/000825.html.

We don't plan to switch to clang/mingw-w64 for Tor Browser 8 as there are likely some timeconsuming loose ends like reproducibility, DEP+ASLR etc. support and others. The plan is to start to work on this for Tor Browser 8.5.

This includes the missing magic to compile Stylo as well. That work in particular will be done in https://bugzilla.mozilla.org/show_bug.cgi?id=1390583.

Note: See TracTickets for help on using tickets.