diff --git a/build.sh b/build.sh index 9db93b70691d..921d1306d4d6 100755 --- a/build.sh +++ b/build.sh @@ -12,6 +12,14 @@ cmake -GNinja -DLLVM_ENABLE_PROJECTS="clang" \ -DLLVM_ENABLE_RUNTIMES="compiler-rt" \ -DLLVM_DEFAULT_TARGET_TRIPLE="aarch64-linux-gnu" \ ../llvm -ninja clang builtins +ninja clang +# free up disk space by stubbing out files that aren't needed for the next targets +rm -rf _CPack_Packages +for file in lib/libclangStaticAnalyzerCheckers.a lib/libclangCodeGen.a lib/libclangSema.a lib/libclangAST.a lib/libclangStaticAnalyzerCore.a lib/CodeGen/**/CMakeFiles/*.dir/*.o lib/Transforms/**/CMakeFiles/*.dir/*.o; do + mv $file $file.bak + touch $file --reference=$file.bak + rm $file.bak +done +ninja builtins # copy to expected target triple cp -arv lib/clang/19/lib/aarch64-linux-gnu lib/clang/19/lib/aarch64-unknown-linux-gnu