wasi-nn: fix shared library filenames for macOS (#4306)

tested with openvino
This commit is contained in:
YAMAMOTO Takashi 2025-06-03 14:23:19 +09:00 committed by GitHub
parent ae6e490ad5
commit 61cb97221e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,9 +21,14 @@
#include "wasm_export.h" #include "wasm_export.h"
#define HASHMAP_INITIAL_SIZE 20 #define HASHMAP_INITIAL_SIZE 20
#define TFLITE_BACKEND_LIB "libwasi_nn_tflite.so" #if defined(__APPLE__)
#define OPENVINO_BACKEND_LIB "libwasi_nn_openvino.so" #define LIB_EXTENTION ".dylib"
#define LLAMACPP_BACKEND_LIB "libwasi_nn_llamacpp.so" #else
#define LIB_EXTENTION ".so"
#endif
#define TFLITE_BACKEND_LIB "libwasi_nn_tflite" LIB_EXTENTION
#define OPENVINO_BACKEND_LIB "libwasi_nn_openvino" LIB_EXTENTION
#define LLAMACPP_BACKEND_LIB "libwasi_nn_llamacpp" LIB_EXTENTION
/* Global variables */ /* Global variables */
struct backends_api_functions { struct backends_api_functions {