[tbb-commits] [builders/tor-browser-build] 06/08: Bug 29321: Use mingw-w64/clang toolchain to build tor

gitolite role git at cupani.torproject.org
Wed Aug 31 13:13:29 UTC 2022


This is an automated email from the git hooks/post-receive script.

pierov pushed a commit to branch main
in repository builders/tor-browser-build.

commit 791d781ee433d832627b478d1f16a4f3599be3a1
Author: Pier Angelo Vendrame <pierov at torproject.org>
AuthorDate: Wed Aug 17 10:55:27 2022 +0200

    Bug 29321: Use mingw-w64/clang toolchain to build tor
    
    Actually, this commit does not hardcode clang, but it switch to
    $arch-w64-mingw32-cc, which we currently alias on the Clang toolchain,
    but we could do the same on GCC so that we will be able to switch
    compilers more easily.
    
    Also, use only static libraries on Windows.
---
 projects/tor/build | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/projects/tor/build b/projects/tor/build
index 08a1c20..c4c1e65 100644
--- a/projects/tor/build
+++ b/projects/tor/build
@@ -41,15 +41,6 @@ tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
 libeventdir=/var/tmp/dist/libevent
 openssldir=/var/tmp/dist/openssl/openssl
 
-[% IF c("var/windows") %]
-  # XXX: It's a bit unfortunate but we need the pthread dll here as libevent
-  # gets compiled with pthread support once it is enabled in GCC, which we need
-  # to do as otherwise the Rust compilaton breaks.
-  mingwlibs=/var/tmp/dist/mingw-w64/[% c("arch") %]-w64-mingw32/bin/
-  cp $zlibdir/lib/*.dll $openssldir/bin/*.dll $libeventdir/bin/*.dll \
-      $gcclibs/*.dll $mingwlibs/libwinpthread-1.dll $distdir/Tor/
-[% END %]
-
 [% IF c("var/linux") %]
   mkdir -p "$distdir/Debug/Tor"
   cp $openssldir/lib/libssl.so.1.1 "$distdir/Tor/"
@@ -79,6 +70,10 @@ openssldir=/var/tmp/dist/openssl/openssl
   cp $libeventdir/lib/libevent-*.dylib $TORBINDIR/
 [% END %]
 
+[% IF c("var/windows") %]
+  export CC=[% c("arch") %]-w64-mingw32-cc
+[% END %]
+
 cd /var/tmp/build/[% project %]-[% c('version') %]
 # add git hash to micro-revision.i for #24995
 echo '"[% c("abbrev", { abbrev_length => 16 }) %]"' > micro-revision.i
@@ -88,6 +83,7 @@ find -type f -print0 | xargs -0 [% c("touch") %]
     [% IF c("var/asan") %]--enable-fragile-hardening[% END %] \
     [% IF c("var/windows") || c("var/android") %]--with-zlib-dir="$zlibdir"[% END %] \
     [% IF c("var/osx") %]--enable-static-openssl[% END %] \
+    [% IF c("var/windows") %]--enable-static-libevent --enable-static-openssl --enable-static-zlib[% END %] \
     --prefix="$distdir" [% c("var/configure_opt") %]
 [% IF c("var/osx") -%]
   export LD_PRELOAD=[% c("var/faketime_path") %]

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tbb-commits mailing list