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() {
237
237
. header ( "wrapper.h" )
238
238
. clang_arg ( format ! ( "-I{}" , llama_src. join( "include" ) . display( ) ) )
239
239
. clang_arg ( format ! ( "-I{}" , llama_src. join( "ggml/include" ) . display( ) ) )
240
+ . clang_arg ( format ! ( "--target={}" , target_triple) )
240
241
. parse_callbacks ( Box :: new ( bindgen:: CargoCallbacks :: new ( ) ) )
241
242
. derive_partialeq ( true )
242
243
. allowlist_function ( "ggml_.*" )
@@ -310,10 +311,7 @@ fn main() {
310
311
} else {
311
312
config. define ( "ANDROID_PLATFORM" , "android-28" ) ;
312
313
}
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" ) {
317
315
config. cflag ( "-march=armv8.7a" ) ;
318
316
config. cxxflag ( "-march=armv8.7a" ) ;
319
317
} else if target_triple. contains ( "x86_64" ) {
You can’t perform that action at this time.
0 commit comments