compiler: Exclude units with no exposed modules from unused package check

Such packages cannot be "used" in the Haskell sense of the word yet are nevertheless necessary as they may provide, e.g., C object code or link flags.

Fixes #24120 (closed).

Merge request reports

Loading