aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-06-02 16:06:04 +0900
committerOphestra <cat@gensokyo.uk>2026-06-02 16:06:04 +0900
commit83498b5a8af4edc6e4f9408fec2d527c2be982a7 (patch)
tree7c3d8f5661bf6561d7f1827b73110f085346617d
parent9e824452bd3799050f6a36dc1774ddf7120bf78a (diff)
cmd/mbf: keep non-native entries alive
Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--cmd/mbf/main.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go
index 1a8cf743..4c7030e2 100644
--- a/cmd/mbf/main.go
+++ b/cmd/mbf/main.go
@@ -782,11 +782,20 @@ func main() {
"Remove identifiers not reachable by loaded packages",
func([]string) error {
return cm.Do(func(cache *pkg.Cache) error {
- t := rosa.Native().Std()
+ t := rosa.Native().Clone().Std()
+ a := t.Append(nil, t.CollectAll()...)
+ for arch := range pkg.Arch() {
+ if arch == runtime.GOARCH {
+ continue
+ }
+ t.DropCaches(arch, t.Flags())
+ a = t.Append(a, t.CollectAll()...)
+ }
+
ids, checksums, err := cache.Clean(
flagDry,
!flagDeep,
- t.Append(nil, t.CollectAll()...)...,
+ a...,
)
log.Printf(
"destroyed %d identifier and %d checksum entries",