File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 8888 pacman -S --noconfirm git
8989 shell : msys2 {0}
9090
91+ - name : windows check compiler versions
92+ if : matrix.os == 'windows-latest'
93+ run : |
94+ echo "=== Compiler Versions ==="
95+ gcc --version
96+ g++ --version
97+ echo "=== C++17 Feature Test ==="
98+ echo '#include <iostream>' > test.cpp
99+ echo '#include <codecvt>' >> test.cpp
100+ echo '#include <locale>' >> test.cpp
101+ echo 'int main() { std::codecvt_utf8_utf16<wchar_t> conv; return 0; }' >> test.cpp
102+ g++ -std=c++17 -c test.cpp 2>&1 || echo "C++17 codecvt not supported"
103+ rm -f test.cpp test.o
104+ shell : msys2 {0}
105+
91106 - name : windows build sqlite-ai
92107 if : matrix.name == 'windows'
93108 run : make extension ${{ matrix.make && matrix.make || ''}}
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ MAKEFLAGS += -j$(CPUS)
2828CC = gcc
2929CXX = g++
3030CFLAGS = -Wall -Wextra -Wno-unused-parameter -I$(SRC_DIR ) -I$(LLAMA_DIR ) /ggml/include -I$(LLAMA_DIR ) /include
31+ CXXFLAGS = -std=c++17 -Wall -Wextra -Wno-unused-parameter -I$(SRC_DIR ) -I$(LLAMA_DIR ) /ggml/include -I$(LLAMA_DIR ) /include
3132LDFLAGS = -L./$(BUILD_LLAMA ) /common -L./$(BUILD_LLAMA ) /ggml/src -L./$(BUILD_LLAMA ) /src -L./$(BUILD_WHISPER ) /src -lcommon -lggml -lggml-cpu -lggml-base -lllama -lwhisper
3233LLAMA_OPTIONS = $(LLAMA ) -DLLAMA_CURL=OFF -DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_TOOLS=OFF -DLLAMA_BUILD_SERVER=OFF
3334WHISPER_OPTIONS = $(WHISPER ) -DWHISPER_BUILD_EXAMPLES=OFF -DWHISPER_BUILD_TESTS=OFF -DWHISPER_BUILD_SERVER=OFF
@@ -55,6 +56,9 @@ ifeq ($(PLATFORM),windows)
5556 # Create .def file for Windows
5657 DEF_FILE := $(BUILD_DIR ) /ai.def
5758 STRIP = strip --strip-unneeded $@
59+ # Windows-specific flags to work around MinGW codecvt issues
60+ LLAMA_OPTIONS += -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=1 -DGGML_USE_UNICODE=0"
61+ WHISPER_OPTIONS += -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=1"
5862else ifeq ($(PLATFORM),macos)
5963 TARGET := $(DIST_DIR ) /ai.dylib
6064 LLAMA_LIBS += $(BUILD_LLAMA ) /ggml/src/ggml-metal/libggml-metal.a $(BUILD_LLAMA ) /ggml/src/ggml-blas/libggml-blas.a
You can’t perform that action at this time.
0 commit comments