Bug 17967 – dmd should work out of the box with Visual Studio Developer Command Prompt

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2017-11-05T15:09:30Z
Last change time
2018-01-08T19:58:11Z
Assigned to
No Owner
Creator
Andre

Comments

Comment #0 by andre — 2017-11-05T15:09:30Z
On a system with Visual Studio / C++ Build Tools installed, it should be possible to extract the dmd windows archive, start the (vs) Developer Command Prompt and directly call: dmd test.d -m64 or dmd test.d -m32mscoff without the need to adapt anything within the sc.ini configuration file of dmd. By calling the developer command prompt (e.g. vsdevcmd -arch=amd64) all environment variables are set for the microsoft linker. The environment variable PATH has as first argument the folder containing the linker for the chosen architecture. The environment variable LIB contains all folders needed. This scenario is highly requested in a build infrastructure (XMake) where scripts downloading the dmd archvive, extracting the archive and calling dmd. Using the dmd windows setup routine which detects the visual studio is not possible. Also adapting the sc.ini by the build script is really cumbersome. The Visual Studio Developer Command Prompt should be a first citizen for dmd on windows systems.
Comment #1 by andre — 2018-01-08T19:58:11Z
With recent version 2.078.0 this feature was implemented.