From ca307f0d1e5fc29d5bf7a36b45ff1e5a77fb0db6 Mon Sep 17 00:00:00 2001 From: Sukhikh Alexander Date: Tue, 6 Feb 2024 15:25:59 +0300 Subject: [PATCH] [R&D][AArch64 Host] Enable build for all main llvm-projects Fix openmp build - musl provides XSI version of strerror_r, not GNU one Issue https://gitee.com/openharmony/third_party_llvm-project/issues/I905ZL Signed-off-by: Sukhikh Alexander --- llvm-build/build-ohos-aarch64.py | 3 ++- openmp/runtime/src/kmp_i18n.cpp | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm-build/build-ohos-aarch64.py b/llvm-build/build-ohos-aarch64.py index 35bceab1a12b..67974140b0b6 100644 --- a/llvm-build/build-ohos-aarch64.py +++ b/llvm-build/build-ohos-aarch64.py @@ -64,7 +64,8 @@ def main(): llvm_defines['LLVM_INCLUDE_TESTS'] = 'OFF' llvm_defines['LLVM_BUILD_TOOLS'] = 'ON' llvm_defines['LLVM_ENABLE_ZLIB'] = 'OFF' - llvm_defines['LLVM_ENABLE_PROJECTS'] = 'clang;lld;clang-tools-extra' + llvm_defines['LLVM_ENABLE_PROJECTS'] = 'clang;clang-tools-extra;lld;lldb;openmp' + # We do not build runtimes, since they will be copied from main toolchain build llvm_defines['LLVM_CONFIG_PATH'] = os.path.join(llvm_root, 'bin', 'llvm-config') llvm_defines['LLVM_TABLEGEN'] = os.path.join(llvm_root, 'bin', 'llvm-tblgen') llvm_defines['CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN'] = llvm_root diff --git a/openmp/runtime/src/kmp_i18n.cpp b/openmp/runtime/src/kmp_i18n.cpp index 2474810ce6bf..a164aa180dd4 100644 --- a/openmp/runtime/src/kmp_i18n.cpp +++ b/openmp/runtime/src/kmp_i18n.cpp @@ -710,8 +710,7 @@ static char *sys_error(int err) { #if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || \ (defined(__BIONIC__) && defined(_GNU_SOURCE) && \ - __ANDROID_API__ >= __ANDROID_API_M__) || \ - (defined(__OHOS__) && defined(_GNU_SOURCE)) + __ANDROID_API__ >= __ANDROID_API_M__) // GNU version of strerror_r. char buffer[2048]; -- Gitee