From e53422c8f96770c9a9b7497955c84f4b742fdd73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 5 May 2021 18:01:39 +0200 Subject: [PATCH] SCons: Disable embree-based modules on x86 (32-bit) Fixes #48482. --- modules/lightmapper_cpu/config.py | 5 ++++- modules/raycast/config.py | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/lightmapper_cpu/config.py b/modules/lightmapper_cpu/config.py index 96efd47d9fb..a3a33b3443e 100644 --- a/modules/lightmapper_cpu/config.py +++ b/modules/lightmapper_cpu/config.py @@ -7,11 +7,14 @@ def can_build(env, platform): # solution. if platform == "android": - return env["android_arch"] in ["arm64v8", "x86", "x86_64"] + return env["android_arch"] in ["arm64v8", "x86_64"] if platform in ["javascript", "server"]: return False + if env["bits"] == "32": + return False + return True diff --git a/modules/raycast/config.py b/modules/raycast/config.py index a2692d3612e..6ea8e0a5de7 100644 --- a/modules/raycast/config.py +++ b/modules/raycast/config.py @@ -2,12 +2,18 @@ def can_build(env, platform): if not env["tools"]: return False + # Depends on Embree library, which supports only x86_64 (originally) + # and aarch64 (thanks to the embree-aarch64 fork). + if platform == "android": - return env["android_arch"] in ["arm64v8", "x86", "x86_64"] + return env["android_arch"] in ["arm64v8", "x86_64"] if platform in ["javascript", "server"]: return False + if env["bits"] == "32": + return False + return True