1# This Source Code Form is subject to the terms of the Mozilla Public 2# License, v. 2.0. If a copy of the MPL was not distributed with this 3# file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 5MOZ_AUTOMATION_L10N_CHECK=0 6 7. "$topsrcdir/build/mozconfig.common" 8 9# ld needs libLTO.so from llvm 10mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/clang/lib" 11 12CROSS_CCTOOLS_PATH=$topsrcdir/cctools 13# This SDK was copied from a local XCode install and uploaded to tooltool. 14# Generate the tarball by running this command with the proper SDK version: 15# sdk_path=$(xcrun --sdk macosx10.12 --show-sdk-path) 16# tar -C $(dirname ${sdk_path}) -cHjf /tmp/$(basename ${sdk_path}).tar.bz2 $(basename ${sdk_path}) 17# Upload the resulting tarball from /tmp to tooltool, and change the entry in 18# `browser/config/tooltool-manifests/macosx64/cross-releng.manifest`. 19CROSS_SYSROOT=$topsrcdir/MacOSX10.11.sdk 20CROSS_PRIVATE_FRAMEWORKS=$CROSS_SYSROOT/System/Library/PrivateFrameworks 21FLAGS="-target x86_64-apple-darwin11 -B $CROSS_CCTOOLS_PATH/bin -isysroot $CROSS_SYSROOT" 22 23export CC="$topsrcdir/clang/bin/clang $FLAGS" 24export CXX="$topsrcdir/clang/bin/clang++ $FLAGS" 25export CPP="$topsrcdir/clang/bin/clang $FLAGS -E" 26export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config 27export LDFLAGS="-Wl,-syslibroot,$CROSS_SYSROOT -Wl,-dead_strip" 28export BINDGEN_CFLAGS="$FLAGS" 29export TOOLCHAIN_PREFIX=$CROSS_CCTOOLS_PATH/bin/x86_64-apple-darwin11- 30export DSYMUTIL=$topsrcdir/build/macosx/llvm-dsymutil 31mk_add_options "export REAL_DSYMUTIL=$topsrcdir/llvm-dsymutil/bin/llvm-dsymutil" 32export MKFSHFS=$topsrcdir/hfsplus-tools/newfs_hfs 33export DMG_TOOL=$topsrcdir/dmg/dmg 34export HFS_TOOL=$topsrcdir/dmg/hfsplus 35 36export HOST_CC="$topsrcdir/clang/bin/clang" 37export HOST_CXX="$topsrcdir/clang/bin/clang++" 38export HOST_CPP="$topsrcdir/clang/bin/clang -E" 39export HOST_CFLAGS="-g" 40export HOST_CXXFLAGS="-g" 41export HOST_LDFLAGS="-g" 42 43ac_add_options --target=x86_64-apple-darwin 44ac_add_options --with-macos-private-frameworks=$CROSS_PRIVATE_FRAMEWORKS 45 46if [ "x$MOZ_PKG_SPECIAL" != "xasan" -a -z "$MOZ_AUTOMATION_ARTIFACT_BUILDS" ]; then 47 # Enable static analysis checks by default on OSX cross builds. 48 # Exception is ASan, where this breaks. 49 # The option is not valid on artifact builds, so don't add it there either. 50 ac_add_options --enable-clang-plugin 51fi 52