Fix code according to review suggestions

This commit is contained in:
qiangxuhui 2024-05-14 10:49:09 +00:00
parent 537b56b139
commit 13508de9a4
3 changed files with 8 additions and 3 deletions

View File

@ -247,7 +247,7 @@ jobs:
build_name: binary_s390x
data: ${{ needs.RunConfig.outputs.data }}
checkout_depth: 0
BuilderBinLOONGARCH64:
BuilderBinLoongarch64:
needs: [RunConfig, BuilderDebRelease]
if: ${{ !failure() && !cancelled() }}
uses: ./.github/workflows/reusable_build.yml
@ -306,7 +306,7 @@ jobs:
- BuilderBinPPC64
- BuilderBinRISCV64
- BuilderBinS390X
- BuilderBinLOONGARCH64
- BuilderBinLoongarch64
- BuilderBinAmd64Compat
- BuilderBinAarch64V80Compat
- BuilderBinClangTidy

View File

@ -75,7 +75,6 @@ if (CMAKE_CROSSCOMPILING)
set (ENABLE_EMBEDDED_COMPILER OFF CACHE INTERNAL "")
set (ENABLE_DWARF_PARSER OFF CACHE INTERNAL "")
set (ENABLE_BLAKE3 OFF CACHE INTERNAL "")
set (COMPILER_CACHE disabled CACHE INTERNAL "")
endif ()
elseif (OS_FREEBSD)
# FIXME: broken dependencies

View File

@ -168,6 +168,7 @@ def parse_env_variables(
is_cross_ppc = compiler.endswith(PPC_SUFFIX)
is_cross_riscv = compiler.endswith(RISCV_SUFFIX)
is_cross_s390x = compiler.endswith(S390X_SUFFIX)
is_cross_loongarch = compiler.endswith(LOONGARCH_SUFFIX)
is_cross_freebsd = compiler.endswith(FREEBSD_SUFFIX)
is_amd64_compat = compiler.endswith(AMD64_COMPAT_SUFFIX)
is_amd64_musl = compiler.endswith(AMD64_MUSL_SUFFIX)
@ -236,6 +237,11 @@ def parse_env_variables(
cmake_flags.append(
"-DCMAKE_TOOLCHAIN_FILE=/build/cmake/linux/toolchain-s390x.cmake"
)
elif is_cross_loongarch:
cc = compiler[: -len(LOONGARCH_SUFFIX)]
cmake_flags.append(
"-DCMAKE_TOOLCHAIN_FILE=/build/cmake/linux/toolchain-loongarch64.cmake"
)
elif is_amd64_compat:
cc = compiler[: -len(AMD64_COMPAT_SUFFIX)]
result.append("DEB_ARCH=amd64")