8000 fix: set clang to use c++ stl · edgenai/llama_cpp-rs@b9cde4a · GitHub
[go: up one dir, main page]

Skip to content

Commit b9cde4a

Browse files
committed
fix: set clang to use c++ stl
1 parent 96548c8 commit b9cde4a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/llama_cpp_sys/build.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ fn main() {
1414

1515
let dst = cmake::Config::new(SUBMODULE_DIR)
1616
.configure_arg("DLLAMA_STATIC=On")
17-
.configure_arg("DBUILD_SHARED_LIBS=On")
1817
.build();
1918

2019
println!("cargo:rustc-link-search=native={}/lib", dst.display());
@@ -25,7 +24,11 @@ fn main() {
2524
.header(HEADER_DIR)
2625
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
2726
.generate_comments(false)
28-
.allowlist_file(HEADER_DIR)
27+
.allowlist_function("llama_.*")
28+
.allowlist_type("llama_.*")
29+
.allowlist_function("ggml_.*")
30+
.allowlist_type("ggml_.*")
31+
.clang_arg("-xc++")
2932
.generate()
3033
.expect("Unable to generate bindings");
3134

0 commit comments

Comments
 (0)
0