config.py 1.1 KB

123456789101112131415161718192021222324252627282930
  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_arch = env["bits"] == "64"
  10. if env["arch"].startswith("arm"):
  11. supported_arch = False
  12. if env["arch"].startswith("ppc"):
  13. supported_arch = False
  14. if env["arch"].startswith("rv"):
  15. supported_arch = False
  16. # Hack to disable on Linux arm64. This won't work well for cross-compilation (checks
  17. # host, not target) and would need a more thorough fix by refactoring our arch and
  18. # bits-handling code.
  19. from platform import machine
  20. if platform == "x11" and machine() != "x86_64":
  21. supported_arch = False
  22. return env["tools"] and supported_platform and supported_arch
  23. def configure(env):
  24. pass