From 391a901e45370bd0e691efcebe1addfdc5ef3678 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Fri, 21 Feb 2025 08:38:27 +0100 Subject: [PATCH] Set libyuv_use_sme to false on Linux arm64 to fix undefined symbol eror on ARMv8 devices --- bin/build-electron | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/build-electron b/bin/build-electron index 7b3be099..21caab98 100755 --- a/bin/build-electron +++ b/bin/build-electron @@ -133,6 +133,15 @@ then WEBRTC_ARGS="${WEBRTC_ARGS} is_debug=false symbol_level=1" fi + # SME requires the ARMv9-A architecture, while most ARM64 devices are ARMv8. This was causing + # "undefined symbol: __arm_tpidr2_save" errors on such devices, including GitHub's ubuntu-22.04-arm runner. + # https://issuetracker.google.com/issues/359006069 + # https://chromium.googlesource.com/libyuv/libyuv/+/61354d2671d9b5c73cc964415fe25bc76cea051a/BUILD.gn#273 + if [ "$(uname)" = "Linux" ] && [ "${TARGET_ARCH}" = "arm64" ] + then + WEBRTC_ARGS="${WEBRTC_ARGS} libyuv_use_sme=false" + fi + ( cd src/webrtc/src gn gen -C "${OUTPUT_DIR}/${BUILD_TYPE}" "--args=${WEBRTC_ARGS}"