Bug 1237 – gdmd should use dmd.conf and $DFLAGS

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
Mac OS X
Creation time
2007-05-16T06:26:00Z
Last change time
2015-06-09T01:31:17Z
Assigned to
ibuclaw
Creator
afb

Comments

Comment #0 by afb — 2007-05-16T06:26:39Z
It would be much easier to do global overrides, such as the ones needed for using Tango (-version=Posix -version=Tango), if the dmd-script wrapper supported the dmd.conf configuration file and the $DFLAGS environment variable... Earlier the compiler .spec was used for this purpose, but that doesn't seem to work anymore. The DMD documentation says: ---- DFLAGS The value of DFLAGS is treated as if it were appended to the command line to dmd ---- dmd.conf Initialization File dmd will look for the initialization file dmd.conf in the following sequence of directories: 1. current working directory 2. directory specified by the HOME environment variable 3. directory dmd resides in 4. /etc/ If found, environment variable settings in the file will override any existing settings. This is handy to make dmd independent of programs with conflicting use of environment variables. Environment variables follow the [Environment] section heading, in NAME=value pairs. The NAMEs are treated as upper case. Comments are lines that start with ;. For example: ; dmd.conf file for dmd ; Names enclosed by %% are searched for in the existing environment ; and inserted. The special name %@P% is replaced with the path ; to this file. [Environment] DFLAGS="-I%@P%/../src/phobos"
Comment #1 by ibuclaw — 2012-03-12T09:13:49Z