[dmd-internals] Building Phobos and druntime as a dylib on Mac OS X

Jacob Carlborg doob at me.com
Sun Dec 4 03:09:18 PST 2011


On 4 dec 2011, at 01:24, Walter Bright wrote:

> 
> 
> On 12/3/2011 2:37 PM, Jacob Carlborg wrote:
>> 
>> Now to the question: how should we implement this? Do we have two implementations, a new implementation targeting 10.7 and the existing one for all previous versions of Mac OS X? Or do we want to just have one implementation, somehow.
>> 
> 
> It either has to have a runtime switch if the 10.7 scheme is not backwards compatible, or we have to stick with the old scheme until the older OSX's disappear.


I'm pretty sure it's not backwards compatible. The tlv_get_addr exists in dyld for Lion but not for Snow Leopard. I would hate to see that we need to wait with this until Snow Leopard disappears. I see three different alternatives:

1. Runtime switch (as you suggests above)

2. The user need to replace dyld with the version from Lion, I have no idea if that will work. That's probably not a good idea to do anyway

3. We implement the runtime part ourself. Now that it is implemented in Lion we can make it forwards compatible (as long as Apple doesn't change the implementation in later versions of OSX)

I think number three is the best alternative, but also the most difficult to implement.

-- 
/Jacob Carlborg



More information about the dmd-internals mailing list