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 . "$topsrcdir/build/mozconfig.common"
7 if [ -d "$topsrcdir/clang" ]; then
8 # mozilla-central based build
9 export CC=$topsrcdir/clang/bin/clang
10 export CXX=$topsrcdir/clang/bin/clang++
11 export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config
12 export DSYMUTIL=$topsrcdir/clang/bin/llvm-dsymutil
13 # Use an updated linker.
14 ldflags="-B$topsrcdir/cctools/bin"
15 export AR=$topsrcdir/cctools/bin/ar
16 export RANLIB=$topsrcdir/cctools/bin/ranlib
17 elif [ -d "$topsrcdir/../clang" ]; then
18 # comm-central based build
19 export CC=$topsrcdir/../clang/bin/clang
20 export CXX=$topsrcdir/../clang/bin/clang++
21 export LLVMCONFIG=$topsrcdir/../clang/bin/llvm-config
22 export DSYMUTIL=$topsrcdir/../clang/bin/llvm-dsymutil
23 # Use an updated linker.
24 ldflags="-B$topsrcdir/../cctools/bin"
25 export AR=$topsrcdir/../cctools/bin/ar
26 export RANLIB=$topsrcdir/../cctools/bin/ranlib
29 # Ensure the updated linker doesn't generate things our older build tools
31 ldflags="$ldflags -Wl,-no_data_in_code_info"
32 export LDFLAGS="$ldflags"
34 # If not set use the system default clang
39 # If not set use the system default clang++
40 if [ -z "$CXX" ]; then