godotengine / godotengine/godot
Compilation failure with `lto=full` on Windows with MSVC `cl.exe`: LNK1248: image size exceeds maximum allowable size (FFFFFFFF)
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
master f032af74536b317b23c7fca3bc7318ced5537344
### System information
Windows 11 - Intel i5 9600k
### Issue description
Compilation randomy fails after a while:
```
[...}
Compiling scene\gui\box_container.cpp ...
Compiling scene\gui\button.cpp ...
Compiling scene\gui\center_container.cpp ...
Compiling scene\gui\check_box.cpp ...
editor\editor.windows.editor.x86_64.lib : fatal error LNK1248: image size (100764120) exceeds maximum allowable size (FFFFFFFF)
Compiling scene\gui\check_button.cpp ...
Compiling scene\gui\code_edit.cpp ...
Compiling scene\gui\color_mode.cpp ...
Compiling scene\gui\color_picker.cpp ...
Compiling scene\gui\color_rect.cpp ...
Compiling scene\gui\container.cpp ...
scons: *** [editor\editor.windows.editor.x86_64.lib] Error 1248
scons: building terminated because of errors.
[Time elapsed: 00:08:12.40]
```
### Steps to reproduce
clone godot
`scons p=windows arch=x86_64 production=yes lto=full target=editor optimize=speed deprecated=no`
### Minimal reproduction project (MRP)
-
Contributor guide
Research direction
Reproduce the failure on Windows using the listed SCons command and the reported master commit. Start with the editor.windows.editor.x86_64.lib build step and the LNK1248 output, then determine why lto=full exceeds the linker limit. Done means the editor build completes successfully with that command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100