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/.
5 if [ "x$IS_NIGHTLY" = "xyes" ]; then
6 # Some nightlies (eg: Mulet) don't want these set.
7 MOZ_AUTOMATION_UPDATE_PACKAGING=${MOZ_AUTOMATION_UPDATE_PACKAGING-1}
9 . "$topsrcdir/build/mozconfig.common"
11 if [ -d "$topsrcdir/clang" ]; then
12 # mozilla-central based build
13 export CC=$topsrcdir/clang/bin/clang
14 export CXX=$topsrcdir/clang/bin/clang++
15 export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config
16 export DSYMUTIL=$topsrcdir/clang/bin/llvm-dsymutil
17 # Use an updated linker.
18 ldflags="-B$topsrcdir/cctools/bin"
19 export AR=$topsrcdir/cctools/bin/ar
20 export RANLIB=$topsrcdir/cctools/bin/ranlib
21 elif [ -d "$topsrcdir/../clang" ]; then
22 # comm-central based build
23 export CC=$topsrcdir/../clang/bin/clang
24 export CXX=$topsrcdir/../clang/bin/clang++
25 export LLVMCONFIG=$topsrcdir/../clang/bin/llvm-config
26 export DSYMUTIL=$topsrcdir/../clang/bin/llvm-dsymutil
27 # Use an updated linker.
28 ldflags="-B$topsrcdir/../cctools/bin"
29 export AR=$topsrcdir/../cctools/bin/ar
30 export RANLIB=$topsrcdir/../cctools/bin/ranlib
33 # Ensure the updated linker doesn't generate things our older build tools
35 ldflags="$ldflags -Wl,-no_data_in_code_info"
36 export LDFLAGS="$ldflags"
38 # If not set use the system default clang
43 # If not set use the system default clang++
44 if [ -z "$CXX" ]; then