It is about the common library and its creation as OBJECT library in Cmake (common_obj
) which is then added to a shared library common
. However, other Graphviz libraries are depending on common_obj
.
I tried to understand why it was done like this and the reason I found were to not compile twice, which reduces compile time and to reduce amount of unused code in resulting files.
On the other side it comes at a cost in complexity in the compile instructions - and prevents macOS universal/fat libraries, i.e. combining arm64 & x86_64 architectures in one file (needed for universal Apps). Creating dependencies on a library declared as OBJECT
will lead to Xcode targets that are linked to either the arm64 or x86_64 versions, which in turn will prevent building all libraries depending on libcommon
as the linker complains that the other architecture cannot be built.
Now, I have no clue whether creating universal libraries is important as a goal for graphviz in any way and would accept if that is not relevant. I am ultimately happy to work on my own version of graphviz.
What do you think?