https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121614
--- Comment #6 from Nathaniel Shead <nshead at gcc dot gnu.org> --- (In reply to m...@duck.com from comment #5) > I would try to make a feature request for gcc to add an option to check > whether CMI is included in the archive with object (also not yet implemented > "module : private;" may work in a similar way); this addition makes sense > for me but I'm not sure if It's good idea to make suggestion or request like > this. It's an interesting thought! I don't know if this is possible though, due to separation of responsibilities: linking is not done by GCC but rather by your system's linker (eg. ld), which doesn't know about modules. And even then in theory you could be dynamically linking the module's object file, so it doesn't really have to be in the archive to begin with.