Skip to content

Commit a99d999

Browse files
Merge pull request #26 from BradHutchings/work-in-progress
Work in progress
2 parents 6fe0e59 + c543fd0 commit a99d999

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,10 @@ OBJ_GGML = \
10241024
$(DIR_GGML)/src/ggml-cpu/ggml-cpu-quants.o \
10251025
$(DIR_GGML)/src/ggml-cpu/ggml-cpu-traits.o \
10261026
$(DIR_GGML)/src/ggml-cpu/binary-ops.o \
1027+
$(DIR_GGML)/src/ggml-cpu/cpu-feats-x86.o \
1028+
$(DIR_GGML)/src/ggml-cpu/ops.o \
10271029
$(DIR_GGML)/src/ggml-cpu/unary-ops.o \
1030+
$(DIR_GGML)/src/ggml-cpu/vec.o \
10281031
$(DIR_GGML)/src/gguf.o \
10291032
$(OBJ_GGML_EXT)
10301033

common/common.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,21 @@ std::string fs_get_cache_directory() {
840840
cache_directory = std::getenv("HOME") + std::string("/Library/Caches/");
841841
#elif defined(_WIN32)
842842
cache_directory = std::getenv("LOCALAPPDATA");
843+
844+
// llama-server-one START
845+
#elif defined(COSMOCC)
846+
// We don't know what OS we are running on at compile time, just CPU architecture.
847+
// try various environment variables, fall back to ~/.cache.
848+
// FUTURE: Checkj if the directories actually exist.
849+
cache_directory = std::getenv("LOCALAPPDATA");
850+
if (cache_directory == "") {
851+
cache_directory = std::getenv("XDG_CACHE_HOME");
852+
}
853+
if (cache_directory == "") {
854+
cache_directory = std::getenv("HOME") + std::string("/.cache/");
855+
}
856+
857+
// llama-server-one END
843858
#else
844859
# error Unknown architecture
845860
#endif

0 commit comments

Comments
 (0)