-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[soundtouch] Fix WASM build by using -O3 instead of -Ofast #37103
Conversation
0d8b645
to
e95aa95
Compare
if(MSVC) | ||
set(COMPILE_DEFINITIONS /O2 /fp:fast) | ||
- set(COMPILE_OPTIONS ) | ||
else() | ||
- set(COMPILE_OPTIONS -Ofast) | ||
+ if(EMSCRIPTEN) | ||
+ list(APPEND COMPILE_OPTIONS -O3) | ||
+ else() | ||
+ list(APPEND COMPILE_OPTIONS -Ofast) | ||
+ endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this follow the vcpkg toolchain and build type instead of being hardcoded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess so, but if upstream wants to force optimizations, better to have something that builds 🤷
From 405c4586d4556982fd5bbddf1c70bc4815465c51 Mon Sep 17 00:00:00 2001 | ||
Date: Sat, 2 Mar 2024 23:02:06 +0100 | ||
Subject: [PATCH] Use -O3 instead of -Ofast when targeting Emscripten (WASM) | ||
|
||
--- | ||
CMakeLists.txt | 9 +++++++-- | ||
1 file changed, 7 insertions(+), 2 deletions(-) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cruft...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is auto-generated by git format-patch
. Not really needed indeed, but IMO doesn't hurt either (the file overview is nice to see what a patch does at a glance)
…#37103) Fixes microsoft#37102 The `-Ofast` option is unfortunately not supported by Emscripten yet (as per emscripten-core/emscripten#11884), therefore we have to patch around this for now. Once the upstream PR is merged and released, we can remove this: https://codeberg.org/soundtouch/soundtouch/pulls/29 - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [x] The "supports" clause reflects platforms that may be fixed by this new version. - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file.
[soundtouch] Fix WASM build by using -O3 instead of -Ofast (microsoft#37103)
Fixes #37102
The
-Ofast
option is unfortunately not supported by Emscripten yet (as per emscripten-core/emscripten#11884), therefore we have to patch around this for now.Once the upstream PR is merged and released, we can remove this: https://codeberg.org/soundtouch/soundtouch/pulls/29
./vcpkg x-add-version --all
and committing the result.