forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[soundtouch] Fix WASM build by using -O3 instead of -Ofast (microsoft…
…#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.
- Loading branch information
Showing
5 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
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(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 14f23e8..dabcb9c 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -3,11 +3,16 @@ project(SoundTouch VERSION 2.3.2 LANGUAGES CXX) | ||
|
||
include(GNUInstallDirs) | ||
|
||
+set(COMPILE_OPTIONS) | ||
+ | ||
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() | ||
endif() | ||
|
||
##################### | ||
-- | ||
2.43.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters