[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser-build/master] Bug 26475: Disable building Rust with Thin LTO



commit e2da10a29f46762a8561e30c36915f8568d18c71
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
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 5d56ad3..a87bf35 100644
--- a/projects/firefox/mozconfig-osx-x86_64
+++ b/projects/firefox/mozconfig-osx-x86_64
@@ -49,9 +49,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



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits