config.py 1.0 KB

12345678910111213141516171819202122232425
  1. def can_build(env, platform):
  2. # Thirdparty dependency OpenImage Denoise includes oneDNN library
  3. # and the version we use only supports x86_64.
  4. # It's also only relevant for tools build and desktop platforms,
  5. # as doing lightmap generation and denoising on Android or HTML5
  6. # would be a bit far-fetched.
  7. # Note: oneDNN doesn't support ARM64, OIDN needs updating to the latest version
  8. supported_platform = platform in ["x11", "osx", "windows", "server"]
  9. supported_bits = env["bits"] == "64"
  10. supported_arch = env["arch"] != "arm64" and not env["arch"].startswith("rv")
  11. # Hack to disable on Linux arm64. This won't work well for cross-compilation (checks
  12. # host, not target) and would need a more thorough fix by refactoring our arch and
  13. # bits-handling code.
  14. from platform import machine
  15. if platform == "x11" and machine() != "x86_64":
  16. supported_arch = False
  17. return env["tools"] and supported_platform and supported_bits and supported_arch
  18. def configure(env):
  19. pass