In a bit of a Multiplatform design quandary. I am maintaining a Kotlin Native library that currently supports two Linux targets (linuxX64 & linuxArm32Hfp). The maintained library uses a C library as a base (dependency), however there are some parts of the dependency which are only applicable to some Unix based targets (eg Linux). Initially I was looking at having the Unix bits shared in the common module, however that would mean it would need to be available for all platform modules which won't work if a new platform module is added that isn't Unix based.
Kotlin 1.5.20 will have the new platform code sharing feature however that would only cover a single platform. Is there a way cover the code sharing for Unix based targets scenario?