Skip to content

Commit c11b827

Browse files
ggerganovMinh141120
authored andcommitted
ggml : fix weak alias win32 (whisper/0)
ggml-ci
1 parent 5b9d89a commit c11b827

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ggml/src/ggml-cpu/ggml-cpu-impl.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,11 +527,14 @@ int ggml_threadpool_chunk_add(struct ggml_threadpool * tp, int value);
527527
#elif defined(__GNUC__)
528528
// GCC/Clang on *nix
529529
# define GGML_WEAK_ALIAS(name, alias) GGML_DO_PRAGMA(weak name = alias) // NOLINT
530-
#elif defined(_MSC_VER) && defined (_WIN64)
530+
#elif defined(_MSC_VER) && defined(_WIN64)
531531
// MSVC
532532
// Note: C name mangling varies across different calling conventions
533533
// see https://learn.microsoft.com/en-us/cpp/build/reference/decorated-names?view=msvc-170
534534
# define GGML_WEAK_ALIAS(name, alias) GGML_DO_PRAGMA(comment(linker, "/alternatename:" #name "=" #alias))
535+
#elif defined(_MSC_VER) && defined(WIN32)
536+
// ref: https://github.com/ggml-org/whisper.cpp/pull/3239#issuecomment-2958224591
537+
# define GGML_WEAK_ALIAS(name, alias) GGML_DO_PRAGMA(comment(linker, "/alternatename:_" #name "=_" #alias))
535538
#else
536539
# error "Unsupported compiler for GGML_WEAK_ALIAS"
537540
#endif

0 commit comments

Comments
 (0)