commit dd1d00a2fed85c8bb22c4f85bbc45da00d0e8c05 Author: Georg Koppen gk@torproject.org Date: Mon Oct 15 09:48:59 2018 +0000
Bug 26475: Disable building Rust with Thin LTO
Building Rust with Thin LTO enabled leads to Tor Browser builds on macOS and probably Linux not being reproducible. The exact reason for that is unknown at the moment, although it seems fixed testing nightly Rust source tarballs as of mid-September 2018.
We therefore disable Thin LTO for now by setting `codegen-units` to `1`. --- projects/firefox/mozconfig-osx-x86_64 | 3 --- projects/rust/build | 10 ++++++++++ 2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/projects/firefox/mozconfig-osx-x86_64 b/projects/firefox/mozconfig-osx-x86_64 index 7ff17e1..1e30084 100644 --- a/projects/firefox/mozconfig-osx-x86_64 +++ b/projects/firefox/mozconfig-osx-x86_64 @@ -48,9 +48,6 @@ ac_add_options --disable-crashreporter ac_add_options --disable-maintenance-service ac_add_options --disable-webrtc ac_add_options --disable-tests -# We need to disable for Stylo right now, as we have reproducibility issues on -# macOS with it enabled, see: #26475. -ac_add_options --disable-stylo # Let's make sure no preference is enabling either Adobe's or Google's CDM. ac_add_options --disable-eme # ac_add_options --disable-ctypes diff --git a/projects/rust/build b/projects/rust/build index 936f49f..61a5d50 100644 --- a/projects/rust/build +++ b/projects/rust/build @@ -65,6 +65,16 @@ cd /var/tmp/build/rustc-[% c('version') %]-src mkdir build cd build ../configure --prefix=$distdir [% c("var/configure_opt") %] + +# We need to disable Thin LTO due to reproducibility issues on macOS and +# probably Linux. Alas, there is no direct option available in the config.toml +# in 1.26.1 yet, so we need to toggle this indirectly via `codegen-units`. +[% IF c("var/osx") || c("var/linux") %] + # It seems hard to pass the proper value via ./configure so we resort to our + # old friend `sed`. + sed -i 's/#codegen-units = 1/codegen-units = 1/' config.toml +[% END %] + make -j[% c("buildconf/num_procs") %] make install cd /var/tmp/dist
tbb-commits@lists.torproject.org