-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCons: Disable misbehaving MSVC incremental linking #80482
SCons: Disable misbehaving MSVC incremental linking #80482
Conversation
I've repeated my experiment from here. I used the same commit and applied this change directly. It resulted in subsequent builds being twice as fast as before (45-50 seconds faster).
Out of curiosity I've removed the patch, and it's the same as before with noticeably longer linking times:
I'm not sure why the initial build is slightly slower now, but that's a fair trade-off if that's what we have for subsequent builds. (Note that in the linked issue my initial time is way too slow because I wasn't plugged in until mid-through the build.) |
This PR may have caused issues when compiling with: scons p=windows vsproj=yes optimize=none debug_symbols=True tests=False dev_mode=True dev_build=True I keep getting silly errors like this one:
A simple workaround is to edit the SConstruct file by removing if env["werror"]:
env.Append(CCFLAGS=["/WX"])
# env.Append(LINKFLAGS=["/WX"]) |
I had this error exactly. I also cleaned everything I could, to no avail. As far as I could tell, there were no It's a few days later and at least one restart and I tried recompiling and just got this (without a newline between errors):
Then recompiled again and it worked. Now I LINK : error LNK1218: warning treated as error; no output file generated
scons: *** [bin\godot.windows.editor.dev.x86_64.console.exe] Error 4099 Recompiling several times does seem to be succeeding now, after a series of the errors above. So I can see multiple things potentially being a problem:
|
Sounds like it does indeed needs the It could be e.g. a timing error with multiple |
We do already set it, it's useless. The error seems to be from the linker not form |
Cherry-picked for 3.6. |
Cherry-picked for 3.5.3. |
Cherry-picked for 4.1.2. |
Fixes #77968.
Testing welcome from MSVC users, to see both whether you could reproduce #77968 and confirm this fixes it, or if you couldn't reproduce it, confirm that it speeds up or doesn't slow down your linking time.