[tor-commits] [tor-browser/tor-browser-45.0.2esr-6.x-1] fixup! TB3: Tor Browser's official .mozconfigs.

gk at torproject.org gk at torproject.org
Tue Apr 19 15:09:49 UTC 2016


commit 833436c0e36649d47df22567b23343c76985243a
Author: Georg Koppen <gk at torproject.org>
Date:   Thu Mar 31 12:43:33 2016 +0000

    fixup! TB3: Tor Browser's official .mozconfigs.
    
    Bug 18331: Update .mozconfig for new cross-compiler
---
 .mozconfig-mac | 39 ++++++++++++++++++++++++++++-----------
 1 file changed, 28 insertions(+), 11 deletions(-)

diff --git a/.mozconfig-mac b/.mozconfig-mac
index dc77c3b..c5ca087 100644
--- a/.mozconfig-mac
+++ b/.mozconfig-mac
@@ -1,28 +1,45 @@
-CROSS_COMPILE=1
+# ld needs libLTO.so from llvm
+mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/clang/lib"
 
-SYSROOTDIR="$HOME/build/MacOSX10.7.sdk"
-CROSS_PRIVATE_FRAMEWORKS="$SYSROOTDIR/System/Library/PrivateFrameworks"
-ROOTDIR="$HOME/build/x-tools/x86_64-apple-darwin10/bin"
-TOOLCHAIN_PREFIX="$ROOTDIR/x86_64-apple-darwin10-"
+CROSS_CCTOOLS_PATH=$topsrcdir/cctools
+CROSS_SYSROOT=$topsrcdir/MacOSX10.7.sdk
+CROSS_PRIVATE_FRAMEWORKS=$CROSS_SYSROOT/System/Library/PrivateFrameworks
+FLAGS="-target x86_64-apple-darwin10 -mlinker-version=136 -B $CROSS_CCTOOLS_PATH/bin -isysroot $CROSS_SYSROOT"
 
-FLAGS="-arch x86_64 -isysroot $SYSROOTDIR"
-CC="$ROOTDIR/x86_64-apple-darwin10-clang $FLAGS"
-CXX="$ROOTDIR/x86_64-apple-darwin10-clang++ $FLAGS"
+export CC="$topsrcdir/clang/bin/clang $FLAGS"
+export CXX="$topsrcdir/clang/bin/clang++ $FLAGS"
+export CPP="$topsrcdir/clang/bin/clang $FLAGS -E"
+export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config
+export LDFLAGS="-Wl,-syslibroot,$CROSS_SYSROOT -Wl,-dead_strip"
+export TOOLCHAIN_PREFIX=$CROSS_CCTOOLS_PATH/bin/x86_64-apple-darwin10-
+#TODO: bug 1184202 - would be nice if these could be detected with TOOLCHAIN_PREFIX automatically
+export AR=${TOOLCHAIN_PREFIX}ar
+export RANLIB=${TOOLCHAIN_PREFIX}ranlib
+export STRIP=${TOOLCHAIN_PREFIX}strip
+export OTOOL=${TOOLCHAIN_PREFIX}otool
+export DSYMUTIL=$topsrcdir/clang/bin/llvm-dsymutil
+
+export HOST_CC="$topsrcdir/clang/bin/clang"
+export HOST_CXX="$topsrcdir/clang/bin/clang++"
+export HOST_CPP="$topsrcdir/clang/bin/clang -E"
+export HOST_CFLAGS="-g"
+export HOST_CXXFLAGS="-g"
+export HOST_LDFLAGS="-g"
+
+ac_add_options --target=x86_64-apple-darwin
+ac_add_options --with-macos-private-frameworks=$CROSS_PRIVATE_FRAMEWORKS
 
 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-macos
 mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
 mk_add_options MOZILLA_OFFICIAL=1
 mk_add_options BUILD_OFFICIAL=1
 
-ac_add_options --target=x86_64-apple-darwin10
 ac_add_options --enable-application=browser
 ac_add_options --enable-strip
 ac_add_options --enable-official-branding
 ac_add_options --enable-optimize
 ac_add_options --disable-debug
 
-ac_add_options --with-macos-private-frameworks="$CROSS_PRIVATE_FRAMEWORKS"
-
 ac_add_options --enable-tor-browser-data-outside-app-dir
 ac_add_options --enable-tor-browser-update
 ac_add_options --enable-update-packaging



More information about the tor-commits mailing list