Skip to content

Commit 7f4c5c6

Browse files
authored
llama : fix linkage with mingw (#551)
* Revert 7e53955 (#542) Still needs to be fixed properly * Fix linking on mingw32
1 parent 2a98bc1 commit 7f4c5c6

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

examples/embedding/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
set(TARGET embedding)
22
add_executable(${TARGET} embedding.cpp)
3-
target_link_libraries(${TARGET} PRIVATE common llama ggml ${CMAKE_THREAD_LIBS_INIT})
3+
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
44
target_compile_features(${TARGET} PRIVATE cxx_std_11)

examples/main/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
set(TARGET main)
22
add_executable(${TARGET} main.cpp)
3-
target_link_libraries(${TARGET} PRIVATE common llama ggml ${CMAKE_THREAD_LIBS_INIT})
3+
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
44
target_compile_features(${TARGET} PRIVATE cxx_std_11)

examples/perplexity/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
set(TARGET perplexity)
22
add_executable(${TARGET} perplexity.cpp)
3-
target_link_libraries(${TARGET} PRIVATE common llama ggml ${CMAKE_THREAD_LIBS_INIT})
3+
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
44
target_compile_features(${TARGET} PRIVATE cxx_std_11)

examples/quantize/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
set(TARGET quantize)
22
add_executable(${TARGET} quantize.cpp)
3-
target_link_libraries(${TARGET} PRIVATE llama ggml ${CMAKE_THREAD_LIBS_INIT})
3+
target_link_libraries(${TARGET} PRIVATE llama ${CMAKE_THREAD_LIBS_INIT})
44
target_compile_features(${TARGET} PRIVATE cxx_std_11)

llama.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <stdbool.h>
77

88
#ifdef LLAMA_SHARED
9-
# ifdef _WIN32
9+
# ifdef _WIN32 && !defined __MINGW32__
1010
# ifdef LLAMA_BUILD
1111
# define LLAMA_API __declspec(dllexport)
1212
# else

0 commit comments

Comments
 (0)