2015-07-14 14:02:22 +03:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
|
|
|
MOZ_AUTOMATION_L10N_CHECK=0
|
|
|
|
|
|
|
|
. "$topsrcdir/build/mozconfig.common"
|
|
|
|
|
2018-12-13 08:45:01 +03:00
|
|
|
# cctools for ld, ar, and other related tools ; dsymutil for rust.
|
|
|
|
mk_add_options "export PATH=$topsrcdir/cctools/bin:$topsrcdir/llvm-dsymutil/bin:$PATH"
|
2018-08-23 07:07:36 +03:00
|
|
|
|
2015-07-14 14:02:22 +03:00
|
|
|
# ld needs libLTO.so from llvm
|
|
|
|
mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/clang/lib"
|
|
|
|
|
2016-12-08 02:11:40 +03:00
|
|
|
# This SDK was copied from a local XCode install and uploaded to tooltool.
|
|
|
|
# Generate the tarball by running this command with the proper SDK version:
|
|
|
|
# sdk_path=$(xcrun --sdk macosx10.12 --show-sdk-path)
|
|
|
|
# tar -C $(dirname ${sdk_path}) -cHjf /tmp/$(basename ${sdk_path}).tar.bz2 $(basename ${sdk_path})
|
|
|
|
# Upload the resulting tarball from /tmp to tooltool, and change the entry in
|
|
|
|
# `browser/config/tooltool-manifests/macosx64/cross-releng.manifest`.
|
2017-09-08 22:49:13 +03:00
|
|
|
CROSS_SYSROOT=$topsrcdir/MacOSX10.11.sdk
|
2015-07-14 14:02:22 +03:00
|
|
|
CROSS_PRIVATE_FRAMEWORKS=$CROSS_SYSROOT/System/Library/PrivateFrameworks
|
|
|
|
|
2018-12-13 08:51:07 +03:00
|
|
|
export CC="$topsrcdir/clang/bin/clang"
|
|
|
|
export CXX="$topsrcdir/clang/bin/clang++"
|
2015-07-14 14:02:22 +03:00
|
|
|
export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config
|
2018-12-13 08:51:07 +03:00
|
|
|
export BINDGEN_CFLAGS="-isysroot $CROSS_SYSROOT"
|
2018-01-19 04:20:41 +03:00
|
|
|
export DSYMUTIL=$topsrcdir/build/macosx/llvm-dsymutil
|
2018-08-31 16:25:27 +03:00
|
|
|
mk_add_options "export REAL_DSYMUTIL=$topsrcdir/llvm-dsymutil/bin/dsymutil"
|
2017-01-31 01:32:32 +03:00
|
|
|
export MKFSHFS=$topsrcdir/hfsplus-tools/newfs_hfs
|
2015-09-10 13:44:24 +03:00
|
|
|
export DMG_TOOL=$topsrcdir/dmg/dmg
|
2017-01-31 01:32:32 +03:00
|
|
|
export HFS_TOOL=$topsrcdir/dmg/hfsplus
|
2015-07-14 14:02:22 +03:00
|
|
|
|
2015-09-11 13:48:50 +03:00
|
|
|
export HOST_CFLAGS="-g"
|
|
|
|
export HOST_CXXFLAGS="-g"
|
2015-07-14 14:02:22 +03:00
|
|
|
export HOST_LDFLAGS="-g"
|
|
|
|
|
2018-12-13 08:25:05 +03:00
|
|
|
ac_add_options --target=x86_64-apple-darwin11
|
2018-12-13 08:51:07 +03:00
|
|
|
ac_add_options --with-macos-sdk=$CROSS_SYSROOT
|
2015-07-14 14:02:22 +03:00
|
|
|
ac_add_options --with-macos-private-frameworks=$CROSS_PRIVATE_FRAMEWORKS
|
|
|
|
|
2017-10-26 23:04:54 +03:00
|
|
|
if [ "x$MOZ_PKG_SPECIAL" != "xasan" -a -z "$MOZ_AUTOMATION_ARTIFACT_BUILDS" ]; then
|
2017-02-10 19:10:23 +03:00
|
|
|
# Enable static analysis checks by default on OSX cross builds.
|
|
|
|
# Exception is ASan, where this breaks.
|
2017-10-26 23:04:54 +03:00
|
|
|
# The option is not valid on artifact builds, so don't add it there either.
|
2017-02-10 19:10:23 +03:00
|
|
|
ac_add_options --enable-clang-plugin
|
|
|
|
fi
|