Thread overview
[Issue 14255] Since DMD is used to build idgen, one can't have dmd.conf for dev and system wide.
Mar 08, 2015
Walter Bright
Mar 08, 2015
deadalnix
Mar 08, 2015
yebblies
Mar 09, 2015
Temtaime
Mar 09, 2015
yebblies
Dec 17, 2022
Iain Buclaw
March 08, 2015
https://issues.dlang.org/show_bug.cgi?id=14255

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> ---
I propose a switch:

   -conf            pick up dmd.conf from where the dmd.exe is
   -conf=filename   use filename as the dmd.conf

--
March 08, 2015
https://issues.dlang.org/show_bug.cgi?id=14255

--- Comment #2 from deadalnix <deadalnix@gmail.com> ---
That forces to have the system's dmd, or dev's dmd to be always used with -conf .

The default build do NOT use the flag. Meaning any use of the dev version of dmd must use the flag (or it is gonna use phobos from the system and explode in flight).

That is effectively break most build out there for dev.

--
March 08, 2015
https://issues.dlang.org/show_bug.cgi?id=14255

yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies@gmail.com

--- Comment #3 from yebblies <yebblies@gmail.com> ---
If you want to have a config file, yet ignore it, you need to use -conf.  That is why it was added.

In most cases that's as simple as

set HOST_DC=path\to\dmd.exe -conf=path\to\sc.ini

or

export HOST_DC=path/to/dmd -conf=path/to/dmd.conf

I'm aware of one issue with doing this on windows which will be fixed shortly.

Adding '-conf' would work just fine too.

--
March 09, 2015
https://issues.dlang.org/show_bug.cgi?id=14255

Temtaime <temtaime@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |temtaime@gmail.com

--- Comment #4 from Temtaime <temtaime@gmail.com> ---
Can you say why there's no config files for gcc/mingw and only with dmd there's firstly dmd.conf, then -conf flags ?

--
March 09, 2015
https://issues.dlang.org/show_bug.cgi?id=14255

--- Comment #5 from yebblies <yebblies@gmail.com> ---
(In reply to Temtaime from comment #4)
> Can you say why there's no config files for gcc/mingw and only with dmd there's firstly dmd.conf, then -conf flags ?

Because gcc/mingw relies on environment variables and relative paths instead. You can do the same with dmd if you really want to.

--
December 30, 2015
https://issues.dlang.org/show_bug.cgi?id=14255

hsteoh@quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh@quickfur.ath.cx

--
December 30, 2015
https://issues.dlang.org/show_bug.cgi?id=14255

--- Comment #6 from hsteoh@quickfur.ath.cx ---
Got bitten by this today. I have an old version of dmd for bootstrapping purposes in /usr/src/d/install, and git checkout of dmd in /usr/src/d/dmd. This setup used to work fine, except that recently, due to changes in druntime/phobos, they no longer compile with the bootstrap version of dmd.

So the solution is to put a dmd.conf in /usr/src/d/install so that the old compiler uses its own version of druntime/phobos, which it can compile. Now /usr/src/d/dmd successfully compiles... except that now it can't link anything, because it can't find the right dmd.conf, so it fails to find the correct version of object.d.

Solution: put another dmd.conf in /usr/src/d/dmd so that the new compiler can find the right paths, right? Yes, it works... however, now dmd cannot be recompiled, because when posix.mak is running in /usr/src/d/dmd/src, it tries to invoke HOST_DMD, and the old compiler picks up ./dmd.conf instead of the correct one in /usr/src/d/install.  Worse, attempting to remedy this by specifying -conf doesn't work, because posix.mak assumes HOST_DMD contains only the pathname to the host dmd executable; any extra parameters appended to HOST_DMD causes the existence check to fail and it refuses to run.

So now I'm stuck. The only way out I can see is to put dmd.conf in /etc or $HOME, but that overrides the system-wide dmd.conf. So this is not workable either.

I need a way to tell posix.mak to run HOST_DMD with additional flags. Is there a way to do this??

--
December 30, 2015
https://issues.dlang.org/show_bug.cgi?id=14255

--- Comment #7 from hsteoh@quickfur.ath.cx ---
https://github.com/D-Programming-Language/dmd/pull/5325

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=14255

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
December 13
https://issues.dlang.org/show_bug.cgi?id=14255

--- Comment #8 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/18953

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--