Skip to content

[5.9][CMake] Use WMO for release builds #1699

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

Closed

Conversation

bnbarham
Copy link
Contributor

  • Explanation: CMake builds were not using WMO for release (this is fixed in 3.26+). This has a significant impact on parsing times (5x).
  • Scope: swift-syntax libraries included in the compiler
  • Risk: Very low. Just enables WMO for release builds.
  • Original PR: [CMake] Use WMO for release builds #1692

This has a significant (5x) speed up when running our performance tests
on eg. apple/swift-docc.

(cherry picked from commit d9d09e8)
@bnbarham bnbarham requested a review from DougGregor May 24, 2023 21:58
@bnbarham bnbarham requested a review from ahoppen as a code owner May 24, 2023 21:58
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@@ -56,6 +56,13 @@ function(add_swift_host_library name)
-emit-module-interface-path;${module_interface_file}
>)

if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please pull in #1705 if this is going to be merged.

@bnbarham bnbarham closed this Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants