www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dmd without gcc depency

reply Jardik <smidjar2.reg email.cz> writes:
Now that dmd is written in D language, is it possible to use dmd 
without the need to have gcc and its libraries installed? Or 
would it be possible, if I didn't need to call any extern C++ 
functions? If not, is it planned for dmd to be self hosting in 
the future?
Dec 25 2015
next sibling parent tcak <1ltkrs+3wyh1ow7kzn1k sharklasers.com> writes:
On Friday, 25 December 2015 at 12:57:50 UTC, Jardik wrote:
 Now that dmd is written in D language, is it possible to use 
 dmd without the need to have gcc and its libraries installed? 
 Or would it be possible, if I didn't need to call any extern 
 C++ functions? If not, is it planned for dmd to be self hosting 
 in the future?
DMD is the front end of the compiler. Where will the linker be coming from? I don't think DMD developers are writing a special linker as well. It only turns codes into object files.
Dec 25 2015
prev sibling parent Joakim <dlang joakim.fea.st> writes:
On Friday, 25 December 2015 at 12:57:50 UTC, Jardik wrote:
 Now that dmd is written in D language, is it possible to use 
 dmd without the need to have gcc and its libraries installed? 
 Or would it be possible, if I didn't need to call any extern 
 C++ functions? If not, is it planned for dmd to be self hosting 
 in the future?
You don't need gcc to _use_ dmd now, only to build its dmc backend. Dmd calls your C compiler, usually gcc, to link objects on linux, but you could replace that with a direct call to your linker if you know what you're doing. If you don't want to use gcc to build dmd itself, there are plans to convert the dmc backend to D also, but not for a couple releases.
Dec 25 2015