C/C++ backend for DMD?
Andrew Wiley
wiley.andrew.j at gmail.com
Wed Jan 25 12:29:51 PST 2012
On Wed, Jan 25, 2012 at 4:26 AM, <equinox at atw.hu> wrote:
>
> Hi,
>
> I have been thinking . Would not C and C++ backend would make DMD more
> versatile?
> D language could be used in many platforms easily.
> D language could be used in .net and elsewhere.
> It could be compiled with other language that are also translated into
> C/C++.
As far as platform support goes, GDC *should* be able to target pretty
much any platform GCC can currently target. There are probably some
platform-specific issues at this point; one example would be that you
have to disable the section-anchors optimization to get D running on
ARM.
There are also some fun things like Fibers not working because the
getcontext/setcontext/makecontext functions in glibc are just stubs on
ARM, but Iain has done an excellent job of adding GCC-specific version
blocks to Druntime that replace most of the platform-specific code
with pre-written GCC intrinsics.
I know Daniel Green had some difficulty getting a toolchain that
supports TLS on Windows, hopefully he can chime in on whether that's
just Windows or will be an issue on other platforms as well.
More information about the Digitalmars-d
mailing list