2020-12-19 14:42:31 +01:00
|
|
|
def can_build(env, platform):
|
|
|
|
# Thirdparty dependency OpenImage Denoise includes oneDNN library
|
2021-08-31 07:27:46 +02:00
|
|
|
# and the version we use only supports x86_64.
|
2020-12-19 14:42:31 +01:00
|
|
|
# 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"]
|
2021-11-01 21:23:18 +01:00
|
|
|
supported_arch = env["bits"] == "64"
|
2024-01-16 18:17:05 +01:00
|
|
|
if env["arch"].startswith("arm"):
|
2021-11-01 21:23:18 +01:00
|
|
|
supported_arch = False
|
|
|
|
if env["arch"].startswith("ppc"):
|
|
|
|
supported_arch = False
|
|
|
|
if env["arch"].startswith("rv"):
|
|
|
|
supported_arch = False
|
2021-02-23 13:48:57 +01:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2021-11-01 21:23:18 +01:00
|
|
|
return env["tools"] and supported_platform and supported_arch
|
2020-12-19 14:42:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
def configure(env):
|
|
|
|
pass
|