Bug 20127 – Add Support for objects with .o extension on Windows

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2019-08-13T09:28:44Z
Last change time
2024-12-13T19:04:56Z
Assigned to
No Owner
Creator
Mike Parker
Moved to GitHub: dmd#19609 →

Comments

Comment #0 by aldacron — 2019-08-13T09:28:44Z
MinGW-w64 [1] (Windows GCC distro -- not the older and dead original MinGW) outputs object files in the MS COFF format. In my simple test builds, both 32- and 64-bit objects are compatible with DMD and the MS linker. Unfortunately, DMD rejects objects with the .o extension on Windows out of hand. They must first be renamed to .obj. Given that the files are compatible, accepting them based on their format rather than their file extension would add a bit of convenience. The same can be said of library files with the .a extension. DMD rejects them out of hand but accepts them when they're renamed to .lib.
Comment #1 by aldacron — 2019-08-13T09:29:21Z
Comment #2 by b2.temp — 2023-12-16T21:20:40Z
There's no reason for DMD to filter "*.o" out, especially since the compiler does nothing with them but passing them to the linker, which then presumably checks the file headers in details. lld-link also accepts "*.o" files BTW.
Comment #3 by robert.schadek — 2024-12-13T19:04:56Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19609 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB