Llvm.global_ctors - macos ignores priority?

I attempt adding constructors, but I have problems with priority across compilation units. In a single module then something with priority 100 will execute before something with priority 200, but if they are in different compilation units and linked together then all bets are off it seems.

I haven’t checked Linux or Windows in detail, but I don’t think they have this problem, as the resulting asm actually encodes the priority - which doesn’t happen on Mac.

So what do I do? Is there a way to fix it? Or if not - are there workarounds?