From 8c417c9c3869b8be19a01e6a8ca90f7a9a4d1368 Mon Sep 17 00:00:00 2001 From: Kudo Chien Date: Sat, 4 Feb 2023 01:30:22 +0800 Subject: [PATCH] fix build errors on 2.26.1 + ndk r23 --- .github/workflows/build_and_test.yml | 3 +-- scripts/compile/common.sh | 1 - scripts/compile/jsc.sh | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 64409017..b0692036 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -29,8 +29,7 @@ jobs: - name: Install Android packages run: | sdkmanager \ - "cmake;3.10.2.4988404" \ - "cmake;3.18.1" \ + "cmake;3.22.1" \ "ndk;23.2.8568313" # move out builtin icu headers from ndk and prevent icu build errors mv "${ANDROID_HOME}/ndk/23.2.8568313/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/unicode" "${ANDROID_HOME}/ndk/23.2.8568313/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/unicode2" diff --git a/scripts/compile/common.sh b/scripts/compile/common.sh index fa37ddcf..0abeba2a 100755 --- a/scripts/compile/common.sh +++ b/scripts/compile/common.sh @@ -113,7 +113,6 @@ COMMON_LDFLAGS=" \ -Wl,-z,noexecstack \ -Wl,--gc-sections \ -Wl,--exclude-libs,libgcc.a \ --Wl,--exclude-libs,libunwind.a \ -Wl,--no-undefined \ " diff --git a/scripts/compile/jsc.sh b/scripts/compile/jsc.sh index 6a2061ea..d87f6249 100755 --- a/scripts/compile/jsc.sh +++ b/scripts/compile/jsc.sh @@ -64,6 +64,7 @@ $TARGETDIR/webkit/Tools/Scripts/build-webkit \ --no-netscape-plugin-api \ --no-tools \ --cmakeargs="-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \ + -DUSE_LD_GOLD=OFF \ -DANDROID_ABI=${JNI_ARCH} \ -DANDROID_PLATFORM=${ANDROID_API} \ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH \ @@ -92,3 +93,5 @@ cp $TARGETDIR/webkit/WebKitBuild/$BUILD_TYPE/lib/libjsc.so $INSTALL_UNSTRIPPED_D cp $TARGETDIR/webkit/WebKitBuild/$BUILD_TYPE/lib/libjsc.so $INSTALL_DIR_I18N/$JNI_ARCH $TOOLCHAIN_DIR/bin/llvm-strip $INSTALL_DIR_I18N/$JNI_ARCH/libjsc.so mv $TARGETDIR/webkit/WebKitBuild $TARGETDIR/webkit/${CROSS_COMPILE_PLATFORM}-${FLAVOR} + +cp $TOOLCHAIN_DIR/sysroot/usr/lib/$CROSS_COMPILE_PLATFORM/libc++_shared.so $INSTALL_CPPRUNTIME_DIR