[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #26475 [Applications/Tor Browser]: ESR60-based Tor Browser bundles are not built reproducibly with Stylo enabled using rustc > 1.25.0
#26475: ESR60-based Tor Browser bundles are not built reproducibly with Stylo
enabled using rustc > 1.25.0
-------------------------------------------------+-------------------------
Reporter: gk | Owner: tbb-
| team
Type: defect | Status: new
Priority: Immediate | Milestone:
Component: Applications/Tor Browser | Version:
Severity: Normal | Resolution:
Keywords: tbb-rbm, TorBrowserTeam201810, | Actual Points:
GeorgKoppen201810 |
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by gk):
Replying to [comment:33 gk]:
> 2) There are additional pieces getting compiled in/used during the LLVM
compilation done during the rust build that are causing the problem.
That's what happening in this case. The relevant part is
{{{
if self.config.rust_codegen_units.is_none() &&
self.build.is_rust_llvm(compiler.host) &&
self.config.rust_thinlto {
cargo.env("RUSTC_THINLTO", "1");
} else if self.config.rust_codegen_units.is_none() {
// Generally, if ThinLTO has been disabled for some
reason, we
// want to set the codegen units to 1. However, we
shouldn't do
// this if the option was specifically set by the user.
cargo.env("RUSTC_CODEGEN_UNITS", "1");
}
}}}
in `builder.rs`.
For some reason `RUSTC_THINLTO` is only set if one does not specify a LLVM
with `--llvm-root` and that is the difference I hit. With it set the
reproducibility problem emerges (even for LLVMs provided by `--llvm-root`
if I rip out `self.build.is_rust_llvm(compiler.host) &&`) without it not.
So, to sum up so far: Compiling with `-C lto` is fine unless
`RUSTC_THINLTO` is used for compiling rust for macOS. Or to be more
precise: unless `RUSTC_THINLTO` is used for the apple target libstd and
related libraries. I could not pinpoint the exact lib that is causing this
issue, though, yet (I can't easily replace them one by one as otherwise
rustc is complaining about libstd being in need of recompilation).
I guess more bisecting is next. :) Alex, do you think we could just avoid
setting `RUSTC_THINLTO` for now when compiling the rust compiler? Or does
that have any serious, known downsides?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26475#comment:44>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs