libopus: enable intrinsics only on supported platforms

This commit is contained in:
Nick Cao 2023-06-13 14:16:02 +08:00 committed by Emery Hemingway
parent 1c7e22f78f
commit 6fd39f3661

View File

@ -7,6 +7,8 @@
, ninja
, fixedPoint ? false
, withCustomModes ? true
, withIntrinsics ? stdenv.hostPlatform.isAarch || stdenv.hostPlatform.isx86
, withAsm ? false
# tests
, ffmpeg-headless
@ -46,7 +48,9 @@ stdenv.mkDerivation rec {
mesonFlags = [
(lib.mesonBool "fixed-point" fixedPoint)
(lib.mesonBool "custom-modes" withCustomModes)
(lib.mesonEnable "asm" false)
(lib.mesonEnable "intrinsics" withIntrinsics)
(lib.mesonEnable "rtcd" (withIntrinsics || withAsm))
(lib.mesonEnable "asm" withAsm)
(lib.mesonEnable "docs" false)
];