forked from implicitfield/llvm-macos-buildbot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
0002-support-partitioned-builds.patch
84 lines (78 loc) · 2.85 KB
/
0002-support-partitioned-builds.patch
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
--- a/test-release.sh
+++ b/test-release.sh
@@ -48,6 +48,7 @@ ExportBranch=""
git_ref=""
do_cmake_cache="no"
do_bolt="no"
+Stages="all"
if [ "$System" = "Linux" ]; then
case $Machine in
x86_64 | arm64 | aarch64 )
@@ -204,6 +205,20 @@ while [ $# -gt 0 ]; do
-use-cmake-cache | --use-cmake-cache )
do_cmake_cache="yes"
;;
+ -stage1 )
+ [ $Stages != "all" ] && echo 'Chaining stages is not supported' && exit 1
+ Stages="stage1"
+ do_test_suite="no"
+ ;;
+ -stage2 )
+ [ $Stages != "all" ] && echo 'Chaining stages is not supported' && exit 1
+ Stages="stage2"
+ do_test_suite="no"
+ ;;
+ -stage3 )
+ [ $Stages != "all" ] && echo 'Chaining stages is not supported' && exit 1
+ Stages="stage3"
+ ;;
-help | --help | -h | --h | -\? )
usage
exit 0
@@ -673,6 +688,7 @@ for Flavor in $Flavors ; do
echo "********************************************************************************"
echo " Release: $Release-$RC"
echo " Build: $Flavor"
+ echo " Stage: $Stages"
echo " System Info: "
echo " `uname -a`"
echo "********************************************************************************"
@@ -691,6 +707,7 @@ for Flavor in $Flavors ; do
llvmCore_phase3_objdir=$BuildDir/Phase3/$Flavor/llvmCore-$Release-$RC.obj
llvmCore_phase3_destdir=$BuildDir/Phase3/$Flavor/llvmCore-$Release-$RC.install
+ if [ "$Stages" = "all" ] || [ "$Stages" = "stage1" ]; then
rm -rf $llvmCore_phase1_objdir
rm -rf $llvmCore_phase1_destdir
@@ -716,7 +733,13 @@ for Flavor in $Flavors ; do
build_llvmCore 1 $Flavor \
$llvmCore_phase1_objdir $llvmCore_phase1_destdir
clean_RPATH $llvmCore_phase1_destdir/usr/local
+ fi
+ if [ "$Stages" = "stage1" ]; then
+ exit 0
+ fi
+
+ if [ "$Stages" = "all" ] || [ "$Stages" = "stage2" ]; then
########################################################################
# Phase 2: Build llvmCore with newly built clang from phase 1.
c_compiler=$llvmCore_phase1_destdir/usr/local/bin/clang
@@ -726,6 +749,11 @@ for Flavor in $Flavors ; do
build_llvmCore 2 $Flavor \
$llvmCore_phase2_objdir $llvmCore_phase2_destdir
clean_RPATH $llvmCore_phase2_destdir/usr/local
+ fi
+
+ if [ "$Stages" = "stage2" ]; then
+ exit 0
+ fi
########################################################################
# Phase 3: Build llvmCore with newly built clang from phase 2.
@@ -760,6 +788,10 @@ done
) 2>&1 | tee $LogDir/testing.$Release-$RC.log
+if [ "$Stages" != "stage3" ] && [ "$Stages" != "all" ]; then
+ exit 0
+fi
+
if [ "$use_gzip" = "yes" ]; then
echo "# Packaging the release as $Package.tar.gz"
else