Source code

Revision control

Other Tools

1
. "$topsrcdir/build/mozconfig.common"
2
3
TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
4
5
if [ -n "$FORCE_GCC" ]; then
6
CC="$MOZ_FETCHES_DIR/gcc/bin/gcc"
7
CXX="$MOZ_FETCHES_DIR/gcc/bin/g++"
8
9
# We want to make sure we use binutils and other binaries in the tooltool
10
# package.
11
mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$PATH"
12
ac_add_options --with-clang-path=$MOZ_FETCHES_DIR/clang/bin/clang
13
else
14
CC="$MOZ_FETCHES_DIR/clang/bin/clang"
15
CXX="$MOZ_FETCHES_DIR/clang/bin/clang++"
16
17
# For some builds we don't want to have Clang based static-analysis activated
18
if [ -z "$DISABLE_CLANG_PLUGIN" ]; then
19
export ENABLE_CLANG_PLUGIN=1
20
fi
21
22
case "$PERFHERDER_EXTRA_OPTIONS" in
23
base-toolchains*)
24
# Clang versions < 7.0 don't support the -fcrash-diagnostics-dir flag.
25
;;
26
*)
27
export CFLAGS="$CFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
28
export CXXFLAGS="$CXXFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
29
;;
30
esac
31
32
if [ -z "$USE_ARTIFACT" ]; then
33
if [ -n "$TASKCLUSTER_PGO_PROFILE_USE" ]; then
34
export MOZ_LTO=cross
35
ac_add_options --enable-profile-use=cross
36
ac_add_options --with-pgo-jarlog=${MOZ_FETCHES_DIR}/en-US.log
37
ac_add_options --with-pgo-profile-path=${MOZ_FETCHES_DIR}/merged.profdata
38
export LLVM_PROFDATA="$MOZ_FETCHES_DIR/clang/bin/llvm-profdata"
39
export AR="$MOZ_FETCHES_DIR/clang/bin/llvm-ar"
40
export NM="$MOZ_FETCHES_DIR/clang/bin/llvm-nm"
41
export RANLIB="$MOZ_FETCHES_DIR/clang/bin/llvm-ranlib"
42
fi
43
fi
44
45
mk_add_options "export PATH=$MOZ_FETCHES_DIR/binutils/bin:$PATH"
46
fi
47
48
. "$topsrcdir/build/unix/mozconfig.stdcxx"