https://issues.dlang.org/show_bug.cgi?id=15060
--- Comment #13 from Jacob Carlborg <[email protected]> --- (In reply to bitwise from comment #12) > (In reply to Jacob Carlborg from comment #10) > >> DMD already does what's necessary for ELF (Linux, FreeBSD). Just do the > >> same > >> for Mach-O and OS X. > > That's easier said than done ;) :) > This is why I was saying we should just add some(or one special one) pragmas > that will allow this to be done in the front end. I don't think this can be completely done in the front end. The code (or that function) that should be run as a global ctor/dtor need to be placed in a special segment/section, if I recall correctly. --
