Bug 22707 – Windows: LIB env variable for link.exe is overwritten

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2022-01-27T13:50:51Z
Last change time
2024-12-13T19:20:36Z
Keywords
industry, link-failure, Optlink
Assigned to
No Owner
Creator
kinke
Moved to GitHub: dmd#18080 →

Comments

Comment #0 by kinke — 2022-01-27T13:50:51Z
DMD seems to overwrite the LIB env var with the LIB value in the sc.ini config file, instead of appending (or prepending) that value to the potentially existing variable (like LDC). So it's impossible to use LIB to point to a directory containing required libs for linking, and one has to resort to `-L/LIBPATH:…` business. The problem seems to be https://github.com/dlang/dmd/blob/71ba3fa46221daa0539b03ed7e41f454bd6ce326/src/dmd/mars.d#L722; existing DFLAGS are merged with the config file value in the line above, but LIB is simply overwritten.
Comment #1 by robert.schadek — 2024-12-13T19:20:36Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18080 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB