mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 12:10:09 +01:00
ci/angle: Use native toolchain for builds
ANGLE really wants to use its own toolchain and sysroot by default. Unfortunately, for AArch64, that toolchain is actually a cross-compiling toolchain designed to be hosted on x64, which is ... not what we want. Use the system toolchain, and since we're not using the bundled compiler, also don't use LLVM's libc++ and abseil, since those don't always work with the system toolchain. v2 (Valentine) * Only use native toolchain on linux * Contain clang-19 environment variables within a subshell Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Antonio Ospite <None> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33467>
This commit is contained in:
parent
4306831a4a
commit
f535d5d591
2 changed files with 33 additions and 6 deletions
|
|
@ -103,32 +103,59 @@ enable_expensive_dchecks=false
|
|||
is_component_build=false
|
||||
is_debug=false
|
||||
target_cpu="${ANGLE_ARCH}"
|
||||
target_os="${ANGLE_TARGET}"
|
||||
EOF
|
||||
|
||||
case "$ANGLE_TARGET" in
|
||||
linux) cat >> out/Release/args.gn <<EOF
|
||||
angle_egl_extension="so.1"
|
||||
angle_glesv2_extension="so.2"
|
||||
use_custom_libcxx=false
|
||||
custom_toolchain="//build/toolchain/linux/unbundle:default"
|
||||
host_toolchain="//build/toolchain/linux/unbundle:default"
|
||||
EOF
|
||||
;;
|
||||
android) cat >> out/Release/args.gn <<EOF
|
||||
target_os="android"
|
||||
android_ndk_version="${ANDROID_NDK_VERSION}"
|
||||
android64_ndk_api_level=${ANDROID_SDK_VERSION}
|
||||
android32_ndk_api_level=${ANDROID_SDK_VERSION}
|
||||
use_custom_libcxx=true
|
||||
EOF
|
||||
;;
|
||||
*) echo "Unexpected ANGLE_TARGET value: $ANGLE_TARGET"; exit 1;;
|
||||
esac
|
||||
|
||||
if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
|
||||
# We need to get an AArch64 sysroot - because ANGLE isn't great friends with
|
||||
# system dependencies - but use the default system toolchain, because the
|
||||
# 'arm64' toolchain you get from Google infrastructure is a cross-compiler
|
||||
# from x86-64
|
||||
build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
|
||||
fi
|
||||
|
||||
gn gen out/Release
|
||||
# depot_tools overrides ninja with a version that doesn't work. We want
|
||||
# ninja with FDO_CI_CONCURRENT anyway.
|
||||
/usr/local/bin/ninja -C out/Release/ libEGL libGLESv1_CM libGLESv2
|
||||
(
|
||||
# The 'unbundled' toolchain configuration requires clang, and it also needs to
|
||||
# be configured via environment variables.
|
||||
export CC="clang-${LLVM_VERSION}"
|
||||
export HOST_CC="$CC"
|
||||
export CFLAGS="-Wno-unknown-warning-option"
|
||||
export HOST_CFLAGS="$CFLAGS"
|
||||
export CXX="clang++-${LLVM_VERSION}"
|
||||
export HOST_CXX="$CXX"
|
||||
export CXXFLAGS="-Wno-unknown-warning-option"
|
||||
export HOST_CXXFLAGS="$CXXFLAGS"
|
||||
export AR="ar"
|
||||
export HOST_AR="$AR"
|
||||
export NM="nm"
|
||||
export HOST_NM="$NM"
|
||||
export LDFLAGS="-lpthread -ldl"
|
||||
export HOST_LDFLAGS="$LDFLAGS"
|
||||
|
||||
gn gen out/Release
|
||||
# depot_tools overrides ninja with a version that doesn't work. We want
|
||||
# ninja with FDO_CI_CONCURRENT anyway.
|
||||
/usr/local/bin/ninja -C out/Release/ libEGL libGLESv1_CM libGLESv2
|
||||
)
|
||||
|
||||
rm -f out/Release/libvulkan.so* out/Release/*.so*.TOC
|
||||
cp out/Release/lib*.so* /angle/
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ variables:
|
|||
DEBIAN_TEST_ANDROID_TAG: "20250210-libdrm"
|
||||
DEBIAN_TEST_GL_TAG: "20250204-fix-deqp"
|
||||
DEBIAN_TEST_VK_TAG: "20250204-fix-deqp"
|
||||
KERNEL_ROOTFS_TAG: "20250206-right-angle"
|
||||
KERNEL_ROOTFS_TAG: "20250212-angular"
|
||||
|
||||
DEBIAN_PYUTILS_IMAGE: "debian/x86_64_pyutils"
|
||||
DEBIAN_PYUTILS_TAG: "20250129-lavacli"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue