From ceeeeb3c06cdb3b8ab175b98c36d15ac6a703fc7 Mon Sep 17 00:00:00 2001 From: qwq233 Date: Fri, 8 Nov 2024 17:16:44 +0800 Subject: [PATCH] fix: ci Signed-off-by: qwq233 --- .github/workflows/ci.yml | 10 ++++++---- .github/workflows/pr.yml | 2 -- TMessagesProj/jni/CMakeLists.txt | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb7cf2df3..7f9723af5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,8 +73,9 @@ jobs: sudo apt-get install wget bison gcc make curl ninja-build -y echo "y" | sdkmanager --install "ndk;$ndkversion" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null - wget https://github.com/qwq233/ollvm-bin/releases/download/18.0.0/clang-18 -O ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang - chmod +x ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang + wget https://github.com/qwq233/ollvm-bin/releases/download/18.0.0/clang-18 -O ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-18 + chmod +x ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-18 + touch ${ANDROID_SDK_ROOT}/ndk/$ndkversion/enable_ollvm echo "sdk.dir=${ANDROID_HOME}" >> local.properties - name: Debug Build run: | @@ -166,8 +167,9 @@ jobs: sudo apt-get install bison gcc make wget curl ninja-build -y echo "y" | sdkmanager --install "ndk;$ndkversion" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null - wget https://github.com/qwq233/ollvm-bin/releases/download/18.0.0/clang-18 -O ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang - chmod +x ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang + wget https://github.com/qwq233/ollvm-bin/releases/download/18.0.0/clang-18 -O ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-18 + chmod +x ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-18 + touch ${ANDROID_SDK_ROOT}/ndk/$ndkversion/enable_ollvm echo "sdk.dir=${ANDROID_HOME}" >> local.properties - name: Debug Build diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0224a62b3..8ccf9175e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -72,8 +72,6 @@ jobs: sudo apt-get install wget bison gcc make curl ninja-build -y echo "y" | sdkmanager --install "ndk;$ndkversion" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null - wget https://github.com/qwq233/ollvm-bin/releases/download/18.0.0/clang-18 -O ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang - chmod +x ${ANDROID_SDK_ROOT}/ndk/$ndkversion/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang echo "sdk.dir=${ANDROID_HOME}" >> local.properties - name: Debug Build diff --git a/TMessagesProj/jni/CMakeLists.txt b/TMessagesProj/jni/CMakeLists.txt index d0874faaf..fbe215e49 100644 --- a/TMessagesProj/jni/CMakeLists.txt +++ b/TMessagesProj/jni/CMakeLists.txt @@ -26,10 +26,10 @@ ${CMAKE_HOME_DIRECTORY}/boringssl/lib/libssl_${ANDROID_ABI}.a, ${CMAKE_HOME_DIRECTORY}/boringssl/lib/libcrypto_${ANDROID_ABI}.a") if (UNIX) -if(EXISTS "${CMAKE_ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang") +if(EXISTS "${CMAKE_ANDROID_NDK}/enable_ollvm") message("ollvm enabled") - set(CMAKE_C_COMPILER "${CMAKE_ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang") - set(CMAKE_CXX_COMPILER "${CMAKE_ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/oclang") + set(CMAKE_C_COMPILER "${CMAKE_ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang") + set(CMAKE_CXX_COMPILER "${CMAKE_ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mllvm -fla -mllvm -split -mllvm -sub -mllvm -bcf") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mllvm -fla -mllvm -split -mllvm -sub -mllvm -bcf") endif()