summaryrefslogtreecommitdiff
path: root/modules/raycast/SCsub
diff options
context:
space:
mode:
Diffstat (limited to 'modules/raycast/SCsub')
-rw-r--r--modules/raycast/SCsub13
1 files changed, 10 insertions, 3 deletions
diff --git a/modules/raycast/SCsub b/modules/raycast/SCsub
index 074795759a..51d75d45b0 100644
--- a/modules/raycast/SCsub
+++ b/modules/raycast/SCsub
@@ -63,10 +63,11 @@ if env["builtin_embree"]:
thirdparty_sources = [thirdparty_dir + file for file in embree_src]
env_raycast.Prepend(CPPPATH=[thirdparty_dir, thirdparty_dir + "include"])
- env_raycast.Append(CPPDEFINES=["EMBREE_TARGET_SSE2", "EMBREE_LOWEST_ISA", "TASKING_INTERNAL", "NDEBUG"])
+ env_raycast.Append(CPPDEFINES=["EMBREE_TARGET_SSE2", "EMBREE_LOWEST_ISA", "TASKING_INTERNAL"])
+ env_raycast.AppendUnique(CPPDEFINES=["NDEBUG"]) # No assert() even in debug builds.
if not env.msvc:
- if env["arch"] == "x86_64":
+ if env["arch"] in ["x86_64", "x86_32"]:
env_raycast.Append(CPPFLAGS=["-msse2", "-mxsave"])
if env["platform"] == "windows":
@@ -78,15 +79,21 @@ if env["builtin_embree"]:
else:
env.Append(LIBS=["psapi"])
+ if env.msvc: # Disable bogus warning about intentional struct padding.
+ env_raycast.Append(CCFLAGS=["/wd4324"])
+
env_thirdparty = env_raycast.Clone()
env_thirdparty.force_optimization_on_debug()
env_thirdparty.disable_warnings()
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
- if env["arch"] == "arm64" or env.msvc:
+ if env["arch"] != "x86_64" or env.msvc:
# Embree needs those, it will automatically use SSE2NEON in ARM
env_thirdparty.Append(CPPDEFINES=["__SSE2__", "__SSE__"])
+ if env["platform"] == "web":
+ env_thirdparty.Append(CPPFLAGS=["-msimd128"])
+
if not env.msvc:
env_thirdparty.Append(
CPPFLAGS=[