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

[soundtouch] Fix WASM build by using -O3 instead of -Ofast #37103

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

fwcd
Copy link
Contributor

@fwcd fwcd commented Mar 2, 2024

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

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@fwcd fwcd force-pushed the fix-soundtouch-emscripten branch from 0d8b645 to e95aa95 Compare March 2, 2024 22:18
@FrankXie05 FrankXie05 added the category:port-bug The issue is with a library, which is something the port should already support label Mar 4, 2024
@FrankXie05 FrankXie05 added the info:reviewed Pull Request changes follow basic guidelines label Mar 4, 2024
@vicroms vicroms merged commit 0d72efb into microsoft:master Mar 5, 2024
16 checks passed
@fwcd fwcd deleted the fix-soundtouch-emscripten branch March 5, 2024 15:00
Comment on lines +19 to +28
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()
Copy link
Contributor

@dg0yt dg0yt Mar 5, 2024

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?

Copy link
Contributor Author

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 🤷

Comment on lines +1 to +8
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(-)

Copy link
Contributor

Choose a reason for hiding this comment

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

Cruft...

Copy link
Contributor Author

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)

fwcd added a commit to fwcd/vcpkg that referenced this pull request Mar 5, 2024
…#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.
daschuer added a commit to mixxxdj/vcpkg that referenced this pull request Mar 5, 2024
[soundtouch] Fix WASM build by using -O3 instead of -Ofast (microsoft#37103)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[soundtouch] Build error on wasm32-emscripten
4 participants