4
4
5
5
# Config
6
6
7
- export SCONS=" scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
7
+ # To speed up builds with single-threaded full LTO linking,
8
+ # we run all builds in parallel each from their own folder.
9
+ export NUM_JOBS=5
10
+ declare -a JOBS=(
11
+ " tools=yes target=release_debug use_closure_compiler=yes"
12
+ " tools=no target=release_debug"
13
+ " tools=no target=release"
14
+ " tools=no target=release_debug dlink_enabled=yes"
15
+ " tools=no target=release dlink_enabled=yes"
16
+ )
17
+
18
+ export SCONS=" scons -j$( expr ${NUM_CORES} / ${NUM_JOBS} ) verbose=yes warnings=no progress=no"
8
19
export OPTIONS=" production=yes"
9
- export OPTIONS_MONO=" module_mono_enabled=yes use_lto=no "
20
+ export OPTIONS_MONO=" module_mono_enabled=yes -j ${NUM_CORES} "
10
21
export TERM=xterm
11
22
12
23
source /root/emsdk/emsdk_env.sh
@@ -21,21 +32,25 @@ tar xf /root/godot.tar.gz --strip-components=1
21
32
if [ " ${CLASSICAL} " == " 1" ]; then
22
33
echo " Starting classical build for Web..."
23
34
24
- $SCONS platform=web ${OPTIONS} target=release_debug tools=no
25
- $SCONS platform=web ${OPTIONS} target=release tools=no
35
+ for i in {0..4}; do
36
+ cp -r /root/godot /root/godot$i
37
+ cd /root/godot$i
38
+ echo " $SCONS platform=web ${OPTIONS} ${JOBS[$i]} "
39
+ $SCONS platform=web ${OPTIONS} ${JOBS[$i]} &
40
+ pids[$i ]=$!
41
+ done
26
42
27
- $SCONS platform=web ${OPTIONS} target=release_debug tools=no dlink_enabled=yes
28
- $SCONS platform=web ${OPTIONS} target=release tools=no dlink_enabled=yes
29
-
30
- mkdir -p /root/out/templates
31
- cp -rvp bin/* .zip /root/out/templates
32
- rm -f bin/* .zip
33
-
34
- $SCONS platform=web ${OPTIONS} target=release_debug tools=yes use_closure_compiler=yes
43
+ for pid in ${pids[*]} ; do
44
+ wait $pid
45
+ done
35
46
36
47
mkdir -p /root/out/tools
37
- cp -rvp bin/* .zip /root/out/tools
38
- rm -f bin/* .zip
48
+ cp -rvp /root/godot0/bin/* tools* .zip /root/out/tools
49
+
50
+ mkdir -p /root/out/templates
51
+ for i in {1..4}; do
52
+ cp -rvp /root/godot$i /bin/* .zip /root/out/templates
53
+ done
39
54
fi
40
55
41
56
# Mono
0 commit comments