Bug 22863 – [REG2.099] -main doesn't work anymore when used for linking only (without source modules)
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-03-09T12:44:13Z
Last change time
2022-03-27T02:24:33Z
Keywords
pull
Assigned to
No Owner
Creator
kinke
Comments
Comment #0 by kinke — 2022-03-09T12:44:13Z
`dmd -main foo.o` yields an undefined `main` for any foo.o not defining a main itself - the __main.o object file doesn't make it to the linker cmdline.
See https://github.com/ldc-developers/ldc/pull/3938.
Comment #1 by dlang-bot — 2022-03-17T11:28:51Z
@dkorpel created dlang/dmd pull request #13830 "Fix issue 22863 - -main doesn't work anymore when used for linking only" fixing this issue:
- Fix issue 22863 - -main doesn't work anymore when used for linking only
https://github.com/dlang/dmd/pull/13830
Comment #2 by bugzilla — 2022-03-20T01:46:16Z
I didn't know that ever worked :-/
Comment #3 by dlang-bot — 2022-03-21T16:32:27Z
dlang/dmd pull request #13830 "Fix issue 22863 - -main doesn't work anymore when used for linking only" was merged into stable:
- ad4c91c37155253de84adb606b95f5a84ecbff4e by Dennis Korpel:
Fix issue 22863 - -main doesn't work anymore when used for linking only
https://github.com/dlang/dmd/pull/13830
Comment #4 by dlang-bot — 2022-03-27T02:24:33Z
dlang/dmd pull request #13892 "Merge stable into master" was merged into master:
- d8c241fb28dea82642865e370ce01063539d608f by Dennis:
Fix issue 22863 - -main doesn't work anymore when used for linking only (#13830)
https://github.com/dlang/dmd/pull/13892