-
Notifications
You must be signed in to change notification settings - Fork 27
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
Disable IPO by default on debug builds in CMake #219
Disable IPO by default on debug builds in CMake #219
Conversation
Debug builds produce slow binaries. We do not gain anything by using IPO here. On the contrary, IPO increases build times considerably. So we disable IPO by default on debug builds to save some developer time.
Hey everyone, could someone please explain what IPO means? I guess it's not initial public offering, right? 🤑 |
Googling "IPO c compilation" gives https://en.wikipedia.org/wiki/Interprocedural_optimization . Is that correct? |
What @ronald-jaepel says: IPO = Interprocedural optimization (mostly link time optimization = LTO). Originally, every compilation unit (roughly a |
When building this PR on Windows 11 with Visual Studio 17.8.5 and MSBuild I get the error:
I therefore replaced
in the CMakeLists.txt with a check if "Debug" and then an added
After that it builds. I rebased onto master and compared the two and with IPO it takes 2:39.6 (minutes:seconds.milliseconds) and without IPO it takes 2:39.1 . Is the difference larger on your machine Sam? |
It doesn't make a noticeable difference on my current machine. It makes a difference on my old one, though. |
All contributors have signed the CLA ✍️ ✅ |
At least one of the following two applies:
|
I have read the CLA Document and I hereby sign the CLA. |
Debug builds produce slow binaries. We do not gain anything by using IPO here. On the contrary, IPO increases build times considerably. So we disable IPO by default on debug builds to save some developer time.