Skip to content

Commit 5e3e083

Browse files
committed
moved out of cuda block
1 parent 4593a00 commit 5e3e083

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

llama-cpp-sys-2/build.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ fn main() {
3838
.flag_if_supported("-mno-unaligned-access");
3939
}
4040

41-
// https://github.com/ggerganov/llama.cpp/blob/191221178f51b6e81122c5bda0fd79620e547d07/Makefile#L133-L141
42-
if cfg!(target_os = "macos") {
43-
llama_cpp.define("_DARWIN_C_SOURCE", None);
44-
}
45-
if cfg!(target_os = "dragonfly") {
46-
llama_cpp.define("__BSD_VISIBLE", None);
47-
}
48-
4941
ggml_cuda
5042
.cuda(true)
5143
.std("c++17")
@@ -57,6 +49,14 @@ fn main() {
5749
llama_cpp.define("GGML_USE_CUBLAS", None);
5850
}
5951

52+
// https://github.com/ggerganov/llama.cpp/blob/191221178f51b6e81122c5bda0fd79620e547d07/Makefile#L133-L141
53+
if cfg!(target_os = "macos") {
54+
llama_cpp.define("_DARWIN_C_SOURCE", None);
55+
}
56+
if cfg!(target_os = "dragonfly") {
57+
llama_cpp.define("__BSD_VISIBLE", None);
58+
}
59+
6060
if let Some(ggml_cuda) = ggml_cuda {
6161
println!("compiling ggml-cuda");
6262
ggml_cuda.compile("ggml-cuda");

0 commit comments

Comments
 (0)