Merge pull request #46345 from akien-mga/3.2-fix-arm64-linux

SCons: Work around compilation issue on Linux ARM64
This commit is contained in:
Rémi Verschelde 2021-02-23 14:24:16 +01:00 committed by GitHub
commit 3faf485da7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View file

@ -8,6 +8,15 @@ def can_build(env, platform):
supported_platform = platform in ["x11", "osx", "windows", "server"]
supported_bits = env["bits"] == "64"
supported_arch = env["arch"] != "arm64"
# Hack to disable on Linux arm64. This won't work well for cross-compilation (checks
# host, not target) and would need a more thorough fix by refactoring our arch and
# bits-handling code.
from platform import machine
if platform == "x11" and machine() != "x86_64":
supported_arch = False
return env["tools"] and supported_platform and supported_bits and supported_arch

View file

@ -6,6 +6,15 @@ def can_build(env, platform):
supported_platform = platform in ["x11", "osx", "windows", "server"]
supported_bits = env["bits"] == "64"
supported_arch = env["arch"] != "arm64"
# Hack to disable on Linux arm64. This won't work well for cross-compilation (checks
# host, not target) and would need a more thorough fix by refactoring our arch and
# bits-handling code.
from platform import machine
if platform == "x11" and machine() != "x86_64":
supported_arch = False
return env["tools"] and supported_platform and supported_bits and supported_arch