| ... | @@ -9373,6 +9373,8 @@ static void add_cache_pkg(CodeGen *g, CacheHash *ch, ZigPackage *pkg) { | ... | @@ -9373,6 +9373,8 @@ static void add_cache_pkg(CodeGen *g, CacheHash *ch, ZigPackage *pkg) { |
| 9373 | // TODO: I think we need a more sophisticated detection of | 9373 | // TODO: I think we need a more sophisticated detection of |
| 9374 | // packages we have already seen | 9374 | // packages we have already seen |
| 9375 | if (entry->value != pkg) { | 9375 | if (entry->value != pkg) { |
| | 9376 | auto root = pkg->package_table.maybe_get(buf_create_from_str("@root")); |
| | 9377 | if (root != nullptr && entry->value == root->value) continue; |
| 9376 | cache_buf(ch, entry->key); | 9378 | cache_buf(ch, entry->key); |
| 9377 | add_cache_pkg(g, ch, entry->value); | 9379 | add_cache_pkg(g, ch, entry->value); |
| 9378 | } | 9380 | } |