diff --git a/android/app/build.gradle b/android/app/build.gradle index 9b17f899..d8291ed7 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -56,7 +56,7 @@ android { applicationId "com.danemadsen.maid" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion + minSdkVersion 23 targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName @@ -94,9 +94,6 @@ android { externalNativeBuild { cmake { - arguments "-DANDROID_ARM_NEON=TRUE", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ABI=arm64-v8a", "-DANDROID_PLATFORM=android-23" - abiFilters 'arm64-v8a', 'x86_64' - cFlags "-march=armv8.4a+dotprod" path "../../src/CMakeLists.txt" } } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d5614071..0e98eac1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,11 @@ cmake_minimum_required(VERSION 3.10) + set(BUILD_SHARED_LIBS ON) + +if(ANDROID) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DANDROID_ARM_NEON=TRUE -DANDROID_TOOLCHAIN=clang -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-23") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DANDROID_ARM_NEON=TRUE -DANDROID_TOOLCHAIN=clang -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-23") +endif() + add_subdirectory(./llama.cpp) add_subdirectory(./butler) diff --git a/src/llama.cpp b/src/llama.cpp index 4a256bb1..c67fe68e 160000 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -1 +1 @@ -Subproject commit 4a256bb1e35f7db869e216b647906ce5e047505c +Subproject commit c67fe68e417f766970fb1feaf2e66458aa24116a