Skip to content

Commit

Permalink
fix: android arch (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO authored Dec 24, 2023
1 parent bb5ff57 commit e82e176
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 26 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ jobs:
os: [ubuntu, windows, macos]
arch: [x64, arm64]
include:
# https://github.com/MaaAssistantArknights/MaaDeps/issues/20
# - os: ubuntu
# arch: arm64-android
- os: ubuntu
arch: arm64-android
- os: ubuntu
arch: arm-android
- os: ubuntu
arch: arm-neon-android
# clang-17: error: unsupported argument 'i686' to option '-march='
# https://github.com/MaaAssistantArknights/MaaDeps/actions/runs/7285060481/job/19851366697
# - os: ubuntu
Expand Down Expand Up @@ -79,7 +80,6 @@ jobs:
if: contains(matrix.arch, 'android')
run: |
git -C vcpkg apply ../vcpkg-overlay/scripts/remove_avoid-version.patch
- name: Install Packages on MacOS
if: runner.os == 'macOS'
Expand Down
9 changes: 5 additions & 4 deletions vcpkg-overlay/triplets/maa-arm-android.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_CMAKE_SYSTEM_NAME Android)
set(VCPKG_CMAKE_SYSTEM_VERSION 23)
set(VCPKG_BUILD_TYPE release)
set(VCPKG_MAKE_BUILD_TRIPLET "--host=arm-linux-android")
set(VCPKG_TARGET_TRIPLET arm-android)
set(VCPKG_CMAKE_CONFIGURE_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS} -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-s")
set(VCPKG_MAKE_BUILD_TRIPLET "--host=armv7a-linux-androideabi")
set(VCPKG_CMAKE_CONFIGURE_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS}
-DANDROID_ABI=armeabi-v7a
-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-s")

include(${CMAKE_CURRENT_LIST_DIR}/maa-linux-library-override.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/maa-android-library-override.cmake)
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_TARGET_ARCHITECTURE arm)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_CMAKE_SYSTEM_NAME Android)
set(VCPKG_CMAKE_SYSTEM_VERSION 23)
set(VCPKG_BUILD_TYPE release)
set(VCPKG_MAKE_BUILD_TRIPLET "--host=x86_64-linux-android")
set(VCPKG_TARGET_TRIPLET x64-android)
set(VCPKG_CMAKE_CONFIGURE_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS} -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF)
set(VCPKG_MAKE_BUILD_TRIPLET "--host=armv7a-linux-androideabi")
set(VCPKG_CMAKE_CONFIGURE_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS}
-DANDROID_ABI=armeabi-v7a -DANDROID_ARM_NEON=ON
-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-s")

include(${CMAKE_CURRENT_LIST_DIR}/maa-linux-library-override.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/maa-android-library-override.cmake)
7 changes: 4 additions & 3 deletions vcpkg-overlay/triplets/maa-arm64-android.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ set(VCPKG_CMAKE_SYSTEM_NAME Android)
set(VCPKG_CMAKE_SYSTEM_VERSION 23)
set(VCPKG_BUILD_TYPE release)
set(VCPKG_MAKE_BUILD_TRIPLET "--host=aarch64-linux-android")
set(VCPKG_TARGET_TRIPLET arm64-android)
set(VCPKG_CMAKE_CONFIGURE_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS} -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-s")
set(VCPKG_CMAKE_CONFIGURE_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS}
-DANDROID_ABI=arm64-v8a
-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-s")

include(${CMAKE_CURRENT_LIST_DIR}/maa-linux-library-override.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/maa-android-library-override.cmake)
11 changes: 0 additions & 11 deletions vcpkg-overlay/triplets/maa-x86-android.cmake

This file was deleted.

0 comments on commit e82e176

Please sign in to comment.