File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,7 @@ fn main() {
237237 . header ( "wrapper.h" )
238238 . clang_arg ( format ! ( "-I{}" , llama_src. join( "include" ) . display( ) ) )
239239 . clang_arg ( format ! ( "-I{}" , llama_src. join( "ggml/include" ) . display( ) ) )
240+ . clang_arg ( format ! ( "--target={}" , target_triple) )
240241 . parse_callbacks ( Box :: new ( bindgen:: CargoCallbacks :: new ( ) ) )
241242 . derive_partialeq ( true )
242243 . allowlist_function ( "ggml_.*" )
@@ -310,10 +311,7 @@ fn main() {
310311 } else {
311312 config. define ( "ANDROID_PLATFORM" , "android-28" ) ;
312313 }
313- if target_triple. contains ( "aarch64" ) {
314- config. cflag ( "-march=armv8.7a" ) ;
315- config. cxxflag ( "-march=armv8.7a" ) ;
316- } else if target_triple. contains ( "armv7" ) {
314+ if target_triple. contains ( "aarch64" ) || target_triple. contains ( "armv7" ) {
317315 config. cflag ( "-march=armv8.7a" ) ;
318316 config. cxxflag ( "-march=armv8.7a" ) ;
319317 } else if target_triple. contains ( "x86_64" ) {
You can’t perform that action at this time.
0 commit comments