From 42f5a6bb6a74f85514bcc3db8533194c31742917 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 2 Oct 2023 13:43:18 -0700 Subject: [PATCH] Clean out old rustc compiler intermediates The CL that splits rust complation and linking into separate actions is being reverted to save disk space. Delete the intermediates that are no longer needed in order to immediately free the disk space. Bug: 293349612 Test: builds Change-Id: I1e9f015bf9b6ffe8ba3ccd11ac3075e90640e9b3 --- CleanSpec.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CleanSpec.mk b/CleanSpec.mk index 4a7e9570b7..dfc0cd0fff 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -776,6 +776,9 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/soong/host) # Clear out tools/metalava Bazel output dir $(call add-clean-step, rm -rf $(OUT_DIR)/bazel/output/execroot/__main__/bazel-out/mixed_builds_product-*/bin/tools/metalava) +# Clear out rustc compiler intermediates after reverting rust compiler/linker split. +$(call add-clean-step, find $(OUT_DIR) -name "*.rsp.whole.a" -print0 | xargs -0 /bin/bash -c 'rm -f $$$${@}; rm -f $$$${@/.rsp.whole.a/.rsp.a}; rm -f $$$${@/.rsp.whole.a/.rsp}') + # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # ************************************************