-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmake-clang.sh
executable file
·49 lines (41 loc) · 959 Bytes
/
make-clang.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
##
## Script: make-clang.sh
##
## This second-level script compiles Clang and any supporting sources.
##
##- Make sure we're in the same directory as this script.
##
export TOP_DIR="$(cd "$(dirname "$0")" && pwd)"
cd $TOP_DIR
##- Get the CLANG-related variables and command-line options for this build.
##
source ./clang-build-vars.sh
##- Make LLVM and CLANG.
##
if [ -n "$DO_CLANG" ]
then
echo "Starting CLANG build..."
cd $CLANG_BLD_DIR
$CLANG_MAKE $CLANG_BUILD_THREADS_ARG
echo "CLANG build completed!"
echo ""
fi
##- Make LIBCXX
##
cd $TOP_DIR
if [ -n "$DO_CXXLIB" ]
then
PATH=$CLANG_BLD_DIR/bin:$PATH
clang++ -v
echo "Starting LIBC++ build..."
cd $LIBCXX_BLD_DIR
$CLANG_MAKE $CLANG_BUILD_THREADS_ARG
if [ -e $TOP_DIR/patches/cxxabi.h ]
then
mv -vf $TOP_DIR/patches/cxxabi.h $LIBCXX_BLD_DIR/include/c++build
fi
echo ""
echo "LIBC++ build completed!"
echo ""
fi