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

CMake: Enable WMO for Release builds #146

Merged
merged 1 commit into from
Oct 13, 2024
Merged

Conversation

kateinoigakukun
Copy link
Member

The new interpreter heavily benefits from WMO and it's even slower than the old one without it. This change enables WMO for Release builds for CMake builds as it's not enabled by default.

Use CMAKE_Swift_COMPILATION_MODE if CMake 3.29 or newer is used, and fall back to add_compile_options if older.
https://cmake.org/cmake/help/latest/prop_tgt/Swift_COMPILATION_MODE.html

The new interpreter heavily benefits from WMO and it's even slower than
the old one without it. This change enables WMO for Release builds for
CMake builds as it's not enabled by default.

Use `CMAKE_Swift_COMPILATION_MODE` if CMake 3.29 or newer is used, and
fall back to `add_compile_options` if older.
https://cmake.org/cmake/help/latest/prop_tgt/Swift_COMPILATION_MODE.html
@kateinoigakukun kateinoigakukun marked this pull request as ready for review October 13, 2024 08:27
@kateinoigakukun kateinoigakukun merged commit 2c6dee1 into main Oct 13, 2024
11 checks passed
@kateinoigakukun kateinoigakukun deleted the katei/wmo-cmake branch October 13, 2024 08:27
kateinoigakukun added a commit to kabiroberai/swift that referenced this pull request Oct 13, 2024
This release includes a fix to the build system that enables WMO for
release builds. swiftwasm/WasmKit#146
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.

1 participant