Skip to content

Commit

Permalink
Bug 1851301 - Disable Soundtouch WASMSIMD for Clang version less than…
Browse files Browse the repository at this point in the history
… 14. r=glandium

Differential Revision: https://phabricator.services.mozilla.com/D189254
  • Loading branch information
Willy R. Vasquez committed Sep 27, 2023
1 parent a6437d5 commit 6ee51df
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions media/libsoundtouch/src/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,15 @@ if CONFIG["MOZ_WASM_SANDBOXING_SOUNDTOUCH"]:
if CONFIG["MOZ_SAMPLE_TYPE_FLOAT32"]:
WASM_DEFINES["MOZ_SAMPLE_TYPE_FLOAT32"] = 1

WASM_SOURCES += ['sse_optimized.cpp']

WASM_DEFINES["SOUNDTOUCH_ALLOW_SSE"] = 1
WASM_DEFINES["SOUNDTOUCH_WASM_SIMD"] = 1
WASM_DEFINES["SIMDE_ENABLE_NATIVE_ALIASES"] = 1
# Clang older than version 14 does not have the necessary
# WASMSIMD intrinsics, so we disable SoundTouch WASMSIMD.
# See Bug 1851301
if int(CONFIG["WASM_CC_VERSION"].split(".")[0]) > 13:
WASM_SOURCES += ['sse_optimized.cpp']

WASM_DEFINES["SOUNDTOUCH_ALLOW_SSE"] = 1
WASM_DEFINES["SOUNDTOUCH_WASM_SIMD"] = 1
WASM_DEFINES["SIMDE_ENABLE_NATIVE_ALIASES"] = 1

soundtouch_sources = WASM_SOURCES
soundtouch_defines = WASM_DEFINES
Expand Down

0 comments on commit 6ee51df

Please sign in to comment.