Skip to content

Commit 050b4ef

Browse files
committed
build-all: Allow passing many common build-llvm/build-mingw-w64 options via this script
1 parent e56fb97 commit 050b4ef

File tree

1 file changed

+48
-7
lines changed

1 file changed

+48
-7
lines changed

build-all.sh

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,48 @@
1616

1717
set -e
1818

19-
if [ $# -lt 1 ]; then
20-
echo $0 dest
19+
LLVM_ARGS=""
20+
MINGW_ARGS=""
21+
22+
while [ $# -gt 0 ]; do
23+
case "$1" in
24+
--enable-asserts)
25+
LLVM_ARGS="$LLVM_ARGS $1"
26+
;;
27+
--full-llvm)
28+
LLVM_ARGS="$LLVM_ARGS $1"
29+
FULL_LLVM=1
30+
;;
31+
--disable-dylib)
32+
LLVM_ARGS="$LLVM_ARGS $1"
33+
;;
34+
--disable-lldb)
35+
LLVM_ARGS="$LLVM_ARGS $1"
36+
NO_LLDB=1
37+
;;
38+
--disable-clang-tools-extra)
39+
LLVM_ARGS="$LLVM_ARGS $1"
40+
;;
41+
--with-default-msvcrt=*)
42+
MINGW_ARGS="$MINGW_ARGS $1"
43+
;;
44+
--with-default-win32-winnt=*)
45+
MINGW_ARGS="$MINGW_ARGS $1"
46+
;;
47+
*)
48+
if [ -n "$PREFIX" ]; then
49+
echo Unrecognized parameter $1
50+
exit 1
51+
fi
52+
PREFIX="$1"
53+
;;
54+
esac
55+
shift
56+
done
57+
if [ -z "$PREFIX" ]; then
58+
echo $0 [--enable-asserts] able-dylib] [--full-llvm] [--with-python] [--symlink-projects] [--disable-lldb] [--disable-clang-tools-extra] [--host=triple] [--with-default-win32-winnt=0x601] [--with-default-msvcrt=ucrt] dest
2159
exit 1
2260
fi
23-
PREFIX="$1"
2461

2562
for dep in git curl cmake; do
2663
if ! hash $dep 2>/dev/null; then
@@ -29,11 +66,15 @@ for dep in git curl cmake; do
2966
fi
3067
done
3168

32-
./build-llvm.sh $PREFIX
33-
./build-lldb-mi.sh $PREFIX
34-
./strip-llvm.sh $PREFIX
69+
./build-llvm.sh $PREFIX $LLVM_ARGS
70+
if [ -z "$NO_LLDB" ]; then
71+
./build-lldb-mi.sh $PREFIX
72+
fi
73+
if [ -z "$FULL_LLVM" ]; then
74+
./strip-llvm.sh $PREFIX
75+
fi
3576
./install-wrappers.sh $PREFIX
36-
./build-mingw-w64.sh $PREFIX
77+
./build-mingw-w64.sh $PREFIX $MINGW_ARGS
3778
./build-mingw-w64-tools.sh $PREFIX
3879
./build-compiler-rt.sh $PREFIX
3980
./build-libcxx.sh $PREFIX

0 commit comments

Comments
 (0)