Bug 16796 – Linker error on big file + -gc switch generated by jtransc

Status
RESOLVED
Resolution
INVALID
Severity
enhancement
Priority
P1
Component
tools
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2016-11-26T17:55:31Z
Last change time
2020-06-05T16:42:51Z
Assigned to
No Owner
Creator
Carlos Ballesteros Velasco

Attachments

IDFilenameSummaryContent-TypeSize
1623program.7zprogram.d in 7zipapplication/x-7z-compressed374970

Comments

Comment #0 by soywiz — 2016-11-26T17:55:31Z
Created attachment 1623 program.d in 7zip I have create a target generating D for my project jtransc: https://github.com/jtransc/jtransc So it allows to convert Java/Kotlin/Scala AOT into D and generate native executables. In complex programs, the generated D file is pretty big. And in order to get comprehensive stacktraces in debug builds I have to add -gc. The big test suite including most of the java standard library generates a ~6MB d file. Without the -gc switch DMD works just fine and generates the executable. dmd --version DMD32 D Compiler v2.072.0 dmd -gc program.d Error: linker exited with status 482878712
Comment #1 by dfj1esp02 — 2016-11-28T09:40:37Z
As a workaround, try microsoft linker with -m32mscoff compiler switch https://dlang.org/dmd-windows.html#switch-m32mscoff dmd -gc -m32mscoff program.d
Comment #2 by pro.mathias.lang — 2020-06-05T16:42:51Z
Closing, as: - If there's an issue, it's an OPTLINK issue, not a tools one; - The referenced project has been archived so following up will not happen; - `-gc` is gone now, one should use `-g`; - A workaround (using mscoff) exists;