Skip to content

Commit 25d0205

Browse files
committed
Angle
1 parent bab9430 commit 25d0205

File tree

1 file changed

+97
-90
lines changed

1 file changed

+97
-90
lines changed

apothecary/formulas/angle/angle.sh

+97-90
Original file line numberDiff line numberDiff line change
@@ -47,93 +47,95 @@ function download() {
4747
git checkout "$VER_FULL"
4848

4949
# # Ensure submodules are fully updated
50-
# echo "Updating ANGLE submodules..."
51-
# git submodule update --init --recursive
52-
53-
case "$TYPE" in
54-
vs) # Windows (Direct3D, Vulkan)
55-
REQUIRED_SUBMODULES=(
56-
"build"
57-
"buildtools"
58-
"third_party/dawn"
59-
"third_party/glslang/src"
60-
"third_party/vulkan-headers/src"
61-
"third_party/vulkan-loader/src"
62-
"third_party/vulkan-tools/src"
63-
"third_party/vulkan-validation-layers/src"
64-
"third_party/vulkan_memory_allocator"
65-
"tools/python"
66-
)
67-
;;
68-
osx|ios|tvos|xros|catos|watchos) # Apple platforms (Metal, OpenGL)
69-
REQUIRED_SUBMODULES=(
70-
"build"
71-
"buildtools"
72-
"third_party/dawn"
73-
"third_party/glslang/src"
74-
"third_party/EGL-Registry/src"
75-
"third_party/OpenGL-Registry/src"
76-
"third_party/spirv-tools/src"
77-
"tools/python"
78-
"tools/clang"
79-
)
80-
;;
81-
android) # Android (Vulkan, GLES)
82-
REQUIRED_SUBMODULES=(
83-
"build"
84-
"buildtools"
85-
"third_party/android_build_tools"
86-
"third_party/android_deps"
87-
"third_party/android_platform"
88-
"third_party/android_sdk"
89-
"third_party/dawn"
90-
"third_party/glslang/src"
91-
"third_party/vulkan-headers/src"
92-
"third_party/vulkan-loader/src"
93-
"third_party/vulkan-tools/src"
94-
"third_party/vulkan-validation-layers/src"
95-
"third_party/vulkan_memory_allocator"
96-
"tools/python"
97-
"tools/clang"
98-
"tools/android"
99-
)
100-
;;
101-
linux) # Linux (OpenGL, Vulkan)
102-
REQUIRED_SUBMODULES=(
103-
"build"
104-
"buildtools"
105-
"third_party/dawn"
106-
"third_party/glslang/src"
107-
"third_party/EGL-Registry/src"
108-
"third_party/OpenGL-Registry/src"
109-
"third_party/spirv-tools/src"
110-
"third_party/wayland"
111-
"third_party/libdrm/src"
112-
"tools/python"
113-
)
114-
;;
115-
emscripten) # WebAssembly (WebGL)
116-
REQUIRED_SUBMODULES=(
117-
"build"
118-
"buildtools"
119-
"third_party/dawn"
120-
"third_party/glslang/src"
121-
"third_party/EGL-Registry/src"
122-
"third_party/OpenGL-Registry/src"
123-
"third_party/spirv-tools/src"
124-
"tools/python"
125-
)
126-
;;
127-
*)
128-
echo "Unsupported TYPE: $TYPE"
129-
exit 1
130-
;;
131-
esac
132-
133-
echo "Initializing required submodules..."
134-
for submodule in "${REQUIRED_SUBMODULES[@]}"; do
135-
git submodule update --init --recursive "$submodule"
136-
done
50+
echo "Updating ANGLE submodules..."
51+
git submodule update --init --recursive
52+
LIMIT_SUBS=false
53+
if [ "$LIMIT_SUBS" == true ]; then
54+
case "$TYPE" in
55+
vs) # Windows (Direct3D, Vulkan)
56+
REQUIRED_SUBMODULES=(
57+
"build"
58+
"buildtools"
59+
"third_party/dawn"
60+
"third_party/glslang/src"
61+
"third_party/vulkan-headers/src"
62+
"third_party/vulkan-loader/src"
63+
"third_party/vulkan-tools/src"
64+
"third_party/vulkan-validation-layers/src"
65+
"third_party/vulkan_memory_allocator"
66+
"tools/python"
67+
)
68+
;;
69+
osx|ios|tvos|xros|catos|watchos) # Apple platforms (Metal, OpenGL)
70+
REQUIRED_SUBMODULES=(
71+
"build"
72+
"buildtools"
73+
"third_party/dawn"
74+
"third_party/glslang/src"
75+
"third_party/EGL-Registry/src"
76+
"third_party/OpenGL-Registry/src"
77+
"third_party/spirv-tools/src"
78+
"tools/python"
79+
"tools/clang"
80+
)
81+
;;
82+
android) # Android (Vulkan, GLES)
83+
REQUIRED_SUBMODULES=(
84+
"build"
85+
"buildtools"
86+
"third_party/android_build_tools"
87+
"third_party/android_deps"
88+
"third_party/android_platform"
89+
"third_party/android_sdk"
90+
"third_party/dawn"
91+
"third_party/glslang/src"
92+
"third_party/vulkan-headers/src"
93+
"third_party/vulkan-loader/src"
94+
"third_party/vulkan-tools/src"
95+
"third_party/vulkan-validation-layers/src"
96+
"third_party/vulkan_memory_allocator"
97+
"tools/python"
98+
"tools/clang"
99+
"tools/android"
100+
)
101+
;;
102+
linux) # Linux (OpenGL, Vulkan)
103+
REQUIRED_SUBMODULES=(
104+
"build"
105+
"buildtools"
106+
"third_party/dawn"
107+
"third_party/glslang/src"
108+
"third_party/EGL-Registry/src"
109+
"third_party/OpenGL-Registry/src"
110+
"third_party/spirv-tools/src"
111+
"third_party/wayland"
112+
"third_party/libdrm/src"
113+
"tools/python"
114+
)
115+
;;
116+
emscripten) # WebAssembly (WebGL)
117+
REQUIRED_SUBMODULES=(
118+
"build"
119+
"buildtools"
120+
"third_party/dawn"
121+
"third_party/glslang/src"
122+
"third_party/EGL-Registry/src"
123+
"third_party/OpenGL-Registry/src"
124+
"third_party/spirv-tools/src"
125+
"tools/python"
126+
)
127+
;;
128+
*)
129+
echo "Unsupported TYPE: $TYPE"
130+
exit 1
131+
;;
132+
esac
133+
134+
echo "Initializing required submodules..."
135+
for submodule in "${REQUIRED_SUBMODULES[@]}"; do
136+
git submodule update --init --recursive "$submodule"
137+
done
138+
fi
137139

138140
cd ..
139141

@@ -161,6 +163,9 @@ function prepare() {
161163
fi
162164
export "PATH=$PWD/depot_tools:$PATH"
163165

166+
python3 scripts/bootstrap.py
167+
gclient sync
168+
164169
# if [[ "$TYPE" =~ ^(linux)$ ]]; then
165170
# ./build/install-build-deps.sh
166171
# fi
@@ -307,12 +312,14 @@ function build() {
307312
echoInfo "Generating GN build files in [build_${TYPE}_${ARCH}]"
308313

309314
if [ $TYPE == "vs" ]; then
310-
gn gen out/Debug --sln=angle-debug --ide=vs2022
315+
gn gen out/Debug --sln=angle-debug --ide=vs2022 --args='$GN_ARGS' out/Debug
316+
autoninja -C out/Debug
311317
else
312-
gn gen --args=$GN_ARGS out/Debug
318+
gn gen --args='$GN_ARGS' out/Release
319+
ninja -j 10 -k1 -C out/Release
313320
fi
314321

315-
autoninja -C out/Debug
322+
316323

317324
#ninja -C "out/Debug" -j${PARALLEL_MAKE}
318325

0 commit comments

Comments
 (0)