From ccccfe758d8bda2b2c40651cd8eed00f5fefe85f Mon Sep 17 00:00:00 2001 From: Niko Date: Fri, 27 Oct 2023 08:16:09 -0600 Subject: [PATCH] Incorporate changes from sandbox-friendly PR --- sys/build.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/build.rs b/sys/build.rs index 43b0d23..9a97c3e 100644 --- a/sys/build.rs +++ b/sys/build.rs @@ -130,6 +130,13 @@ fn main() { if cfg!(feature = "opencl") { config.define("WHISPER_CLBLAST", "ON"); } + + if cfg!(feature = "metal") { + config.define("WHISPER_METAL", "ON"); + } else { + // Metal is enabled by default, so we need to explicitly disable it + config.define("WHISPER_METAL", "OFF"); + } let destination = config.build();