Skip to content
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

Disabled LTO for x86 clang-cl CI builds #70

Merged
merged 1 commit into from
Dec 13, 2022
Merged

Disabled LTO for x86 clang-cl CI builds #70

merged 1 commit into from
Dec 13, 2022

Conversation

mihe
Copy link
Contributor

@mihe mihe commented Dec 8, 2022

This solution is not ideal, but I keep seeing x86 clang-cl builds failing from what looks like it being out of memory.

This stems from Visual Studio only shipping two editions of LLVM, one for x86 and for x64, instead of the four editions it ships of Visual C++, where you have one pair for each host architecture. This means that x86 clang-cl builds are currently being compiled with a 32-bit compiler/linker, which seem to hit their memory ceiling at random times.

LTO has historically been a real memory hog, so I'm hoping this will give me some breathing room until I can fix this in some other way.

The proper solution will most likely be to make a CMake toolchain file for clang-cl on Windows, which should let me bypass CMake's scanning of output binaries and effectively cross-compile x86-on-x64. This would also let us use the official release of LLVM, instead of having to rely on the (seemingly custom) Microsoft-provided one, which should help shorten scripts/ci_setup_windows.ps1 a fair bit.

@mihe
Copy link
Contributor Author

mihe commented Dec 9, 2022

With no option to disable LTO/LTCG in Jolt itself, I'm realizing that this workaround might not be viable. I should just go for the toolchain file instead.

@mihe mihe closed this Dec 9, 2022
@mihe mihe deleted the ci-lto branch December 9, 2022 08:15
@mihe mihe restored the ci-lto branch December 13, 2022 09:48
@mihe mihe reopened this Dec 13, 2022
@mihe mihe changed the title Disabled LTO for all CI builds Disabled LTO for x86 clang-cl CI builds Dec 13, 2022
@mihe mihe merged commit 9544e79 into godot-jolt:master Dec 13, 2022
@mihe mihe deleted the ci-lto branch December 13, 2022 11:33
@mihe
Copy link
Contributor Author

mihe commented Dec 13, 2022

I ended up creating a pull request (jrouwe/JoltPhysics#357) for Jolt to add an option for disabling LTO, so this PR was able to go forward after all.

I limited it to only x86 clang-cl builds instead of all builds. We'll see how this goes.

@mihe mihe added bug Something that isn't working as intended topic:ci Concerning continuous integration labels Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working as intended topic:ci Concerning continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant