www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Allow to override /etc/dmd.conf by placing alternative to

reply Alexey <invalid email.address> writes:
(subject)

As I'm currently experiencing problems with D installation on 
Fedora 35, I'm trying to create Dlang environment under my home 
directory. Specifically, I wrote some rdmd "script" ([1]) to 
automatically clone gits of dmd/druntime/phobos/tools, clone them 
in separate dirs and checkout stable version. the current pitfall 
is how to configure dmd to use new phobos copy, and not the one 
which is currently installed system-wide.

maybe there are some other solution to configure dub and dmd to 
use this separate phobos?

[1]: 
https://github.com/AnimusPEXUS/deployD/blob/29d0c5926c1de36e245dda056680d4d736202c14/deployD.d
Nov 08 2021
next sibling parent reply Dennis <dkorpel gmail.com> writes:
On Monday, 8 November 2021 at 12:42:54 UTC, Alexey wrote:
 maybe there are some other solution to configure dub and dmd to 
 use this separate phobos?
I think you can pass `-conf=~/.dmd/dmd.conf` to dmd
Nov 08 2021
parent Alexey <invalid email.address> writes:
On Monday, 8 November 2021 at 12:52:46 UTC, Dennis wrote:
 On Monday, 8 November 2021 at 12:42:54 UTC, Alexey wrote:
 maybe there are some other solution to configure dub and dmd 
 to use this separate phobos?
I think you can pass `-conf=~/.dmd/dmd.conf` to dmd
this isn't ok, because I need more permanent behavior. dmd options - are not permanent decision.
Nov 08 2021
prev sibling parent reply Alexey <invalid email.address> writes:
On Monday, 8 November 2021 at 12:42:54 UTC, Alexey wrote:
 (subject)
oops. looks like dmd already uses dmd.conf placed next to it.
Nov 08 2021
parent reply Petar Kirov [ZombineDev] <petar.p.kirov gmail.com> writes:
On Monday, 8 November 2021 at 13:55:35 UTC, Alexey wrote:
 On Monday, 8 November 2021 at 12:42:54 UTC, Alexey wrote:
 (subject)
oops. looks like dmd already uses dmd.conf placed next to it.
On Posix systems, `dmd` searches for `dmd.conf` in several places, in this order: 1. current directory 2. `$HOME` directory 3. `argv0` directory 4. `$SYSCONFDIR` (environment variable set when `dmd` is built), `/etc` by default
Nov 08 2021
parent Paul Backus <snarwin gmail.com> writes:
On Monday, 8 November 2021 at 14:10:12 UTC, Petar Kirov 
[ZombineDev] wrote:
 On Monday, 8 November 2021 at 13:55:35 UTC, Alexey wrote:
 On Monday, 8 November 2021 at 12:42:54 UTC, Alexey wrote:
 (subject)
oops. looks like dmd already uses dmd.conf placed next to it.
On Posix systems, `dmd` searches for `dmd.conf` in several places, in this order: 1. current directory 2. `$HOME` directory 3. `argv0` directory 4. `$SYSCONFDIR` (environment variable set when `dmd` is built), `/etc` by default
Now documented: https://github.com/dlang/dmd/pull/13280
Nov 08 2021