-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
My guess is that the modules are not laid out correctly. Rewriting them to test this assertion would take a lot of work. They work this way, but it isn't optimal.
Here is Snapshot.cppm.
module;
export module spectrum:Snapshot;
import peripherals;
import z80_common;
#include "spectrum/Snapshot.hpp"
#include "Snapshot.cpp"
The translation unit Snapshot.cpp should be a Module Implementation Unit, not included in the Module Interface Unit (MIU). The same is true of Spectrum.cppm and Spectrum.hpp. This pattern occurs throughout the code. I can understand why this approach was used since it is a straightforward way of converting the library to modules.
An MIU should not have any code; if it does, it should be in a private fragment. That is only valid, IMHO, for trivial code.
I cannot explain why this would cause so much relinking. Sorry I couldn't be more helpful.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels