dawn-cmake/mach/add-dependencies.sh

47 lines
1.7 KiB
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
set -exuo pipefail
echo "Note: You should run gclient sync before this script"
# Remove unneeded dependencies
rm -rf build
rm -rf buildtools
rm -rf testing
rm -rf third_party/angle
2022-05-09 04:19:04 +00:00
rm -rf third_party/benchmark
rm -rf third_party/catapult
rm -rf third_party/googletest
2022-05-09 04:19:04 +00:00
rm -rf third_party/gpuweb-cts
rm -rf third_party/llvm-build
rm -rf third_party/markupsafe
2022-05-09 04:19:04 +00:00
rm -rf third_party/protobuf
rm -rf third_party/swiftshader
rm -rf third_party/vulkan_memory_allocator
rm -rf third_party/vulkan-deps/glslang
rm -rf third_party/vulkan-deps/spirv-cross
rm -rf third_party/vulkan-deps/vulkan-loader
rm -rf third_party/vulkan-deps/vulkan-validation-layers
2022-05-09 04:19:04 +00:00
rm -rf third_party/webgpu-cts
rm -rf third_party/zlib
2022-02-11 19:13:29 +00:00
# Ensure vulkan-deps are committed
2022-05-09 04:19:04 +00:00
rm -f third_party/vulkan-deps/.gitignore
2022-02-11 19:13:29 +00:00
# Remove gitmodules, some third_party/ repositories contain these and leaving them around would
# cause any recursive submodule clones to fail because e.g. some reference internal Google
# repositories. We don't want them anyway.
find third_party -type f -name .gitmodules -delete
# Turn subrepositories into regular folders.
find third_party -depth -type d -name .git -exec rm -rf {} \;
# Remove files that are not needed.
find third_party -depth -type d -name tests -print -exec rm -rf {} \;
find third_party -depth -type d -name docs -print -exec rm -rf {} \;
find third_party -depth -type d -name samples -print -exec rm -rf {} \;
rm -rf third_party/swiftshader/third_party/SPIRV-Tools # already in third_party/vulkan-deps/spirv-tools
rm -rf third_party/swiftshader/third_party/SPIRV-Headers # already in third_party/vulkan-deps/spirv-headers
git add third_party/
echo "you may now 'git commit -s -m 'update dependencies' if you are happy with the staged changes"