Skip to content

Commit

Permalink
fix: try to update ndk to r26b
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Dec 23, 2023
1 parent e3b7c44 commit 4ff7499
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,16 @@ jobs:
if: contains(matrix.arch, 'android')
id: setup-ndk
with:
# clang-17: error: unknown argument: '-avoid-version'
# https://github.com/MaaAssistantArknights/MaaDeps/actions/runs/7285134601/job/19851552458
# https://github.com/microsoft/vcpkg/issues/31332
# ndk-version: r26b
ndk-version: r25c
ndk-version: r26b
add-to-path: false

# https://github.com/microsoft/vcpkg/issues/31332
- name: Fix Android LDFLAGS error
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'
run: |
Expand Down
21 changes: 21 additions & 0 deletions vcpkg-overlay/scripts/remove_avoid-version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake
index 6d6867da0f..3af1a3b9bc 100644
--- a/scripts/cmake/vcpkg_configure_make.cmake
+++ b/scripts/cmake/vcpkg_configure_make.cmake
@@ -791,10 +791,12 @@ function(vcpkg_configure_make)
# https://www.gnu.org/software/libtool/manual/html_node/Link-mode.html
# -avoid-version is handled specially by libtool link mode, this flag is not forwarded to linker,
# and libtool tries to avoid versioning for shared libraries and no symbolic links are created.
- if(VCPKG_TARGET_IS_ANDROID)
- set(ENV{LDFLAGS} "-avoid-version $ENV{LDFLAGS}")
- set(ENV{LDFLAGS_FOR_BUILD} "-avoid-version $ENV{LDFLAGS_FOR_BUILD}")
- endif()
+
+ # fix https://github.com/microsoft/vcpkg/issues/31332
+ # if(VCPKG_TARGET_IS_ANDROID)
+ # set(ENV{LDFLAGS} "-avoid-version $ENV{LDFLAGS}")
+ # set(ENV{LDFLAGS_FOR_BUILD} "-avoid-version $ENV{LDFLAGS_FOR_BUILD}")
+ # endif()

if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS)
# configure not using all flags to check if compiler works ...

0 comments on commit 4ff7499

Please sign in to comment.