Skip to content

Disable Whole Program Optimization on MSVC (backport #915)#960

Open
mergify[bot] wants to merge 2 commits into
ign-physics5from
mergify/bp/ign-physics5/pr-915
Open

Disable Whole Program Optimization on MSVC (backport #915)#960
mergify[bot] wants to merge 2 commits into
ign-physics5from
mergify/bp/ign-physics5/pr-915

Conversation

@mergify

@mergify mergify Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

🦟 Bug fix

Summary

This leverages the new GZ_MSVC_WPO option in gz-cmake to globally disable Whole Program Optimization (which removes /GL and /LTCG) to significantly speed up Windows build times.

Checklist

  • Signed all commits for DCO
  • Added a screen capture or video to the PR description that demonstrates the fix (as needed)
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • Updated Bazel files (if adding new files). Created an issue otherwise.
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers
  • Was GenAI used to generate this PR? If so, make sure to add "Generated-by" to your commits. (See this policy for more info.)

Generated-By: Gemini 3.1 Pro

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.

Backports: If this is a backport, please use Rebase and Merge instead.


This is an automatic backport of pull request #915 done by [Mergify](https://mergify.com).

This leverages the new GZ_MSVC_WPO option in gz-cmake to globally disable Whole Program Optimization (which removes /GL and /LTCG) to significantly speed up Windows build times.

Generated-By: Gemini 3.1 Pro

Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
(cherry picked from commit 95c080b)
@mergify mergify Bot requested review from azeey and scpeters as code owners April 22, 2026 17:21
@github-actions github-actions Bot added the 🏯 fortress Ignition Fortress label Apr 22, 2026
@mergify mergify Bot mentioned this pull request Apr 22, 2026
11 tasks
Disabling WPO in #915 changes how inline destructors are handled. The unregisterAtUnload hack accesses the DART factory singleton during the DLL unload phase, which causes an ABI/allocator mismatch and STATUS_HEAP_CORRUPTION on Windows. Wrapping the hack in #ifndef _WIN32 prevents this crash.

Generated-by: Gemini 3.1 Pro
Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏯 fortress Ignition Fortress

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

1 participant