godot/modules/denoise/config.py
Rémi Verschelde 6b2cfa416c SCons: Work around compilation issue on Linux ARM64
Fixes #45687.

This is really just a band-aid, our current buildsystem doesn't work well for
cross-compilation and needs a thorough refactoring to do so.
2021-02-23 14:08:45 +01:00

25 lines
999 B
Python

def can_build(env, platform):
# Thirdparty dependency OpenImage Denoise includes oneDNN library
# which only supports 64-bit architectures.
# It's also only relevant for tools build and desktop platforms,
# as doing lightmap generation and denoising on Android or HTML5
# would be a bit far-fetched.
# Note: oneDNN doesn't support ARM64, OIDN needs updating to the latest version
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
def configure(env):
pass