summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-12-15 13:38:27 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-12-20 10:10:30 +0100
commitb5a8055b5cf69a63e32045f433bf1e7fd39d49ad (patch)
treeb8b57c50ba8c26028da7bbcc5ab4c5cddc61be9a /modules
parentdcb3754db09b7b8c35aae1fedbc485b91e9f9508 (diff)
embree: Fix Linux ARM64 build with `-flax-vector-conversions`
This is a change done upstream in the `devel3` branch for 3.13.6: https://github.com/embree/embree/commit/82ca6b5ccb7abe0403a658a0e079926478f04cb1 They also seem to define it for macOS, but for us it breaks the build... ¯\_(ツ)_/¯ Also change wrong use of CPPFLAGS (pre-processor) where CXXFLAGS (C++) makes more sense.
Diffstat (limited to 'modules')
-rw-r--r--modules/raycast/SCsub12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/raycast/SCsub b/modules/raycast/SCsub
index 51d75d45b0..37c8a95905 100644
--- a/modules/raycast/SCsub
+++ b/modules/raycast/SCsub
@@ -68,10 +68,10 @@ if env["builtin_embree"]:
if not env.msvc:
if env["arch"] in ["x86_64", "x86_32"]:
- env_raycast.Append(CPPFLAGS=["-msse2", "-mxsave"])
+ env_raycast.Append(CCFLAGS=["-msse2", "-mxsave"])
if env["platform"] == "windows":
- env_raycast.Append(CPPFLAGS=["-mstackrealign"])
+ env_raycast.Append(CCFLAGS=["-mstackrealign"])
if env["platform"] == "windows":
if env.msvc:
@@ -92,11 +92,15 @@ if env["builtin_embree"]:
env_thirdparty.Append(CPPDEFINES=["__SSE2__", "__SSE__"])
if env["platform"] == "web":
- env_thirdparty.Append(CPPFLAGS=["-msimd128"])
+ env_thirdparty.Append(CXXFLAGS=["-msimd128"])
if not env.msvc:
+ # Flags synced with upstream gnu.cmake.
+ if env["arch"] == "arm64" and env["platform"] == "linuxbsd":
+ env_thirdparty.Append(CXXFLAGS=["-flax-vector-conversions"])
+
env_thirdparty.Append(
- CPPFLAGS=[
+ CXXFLAGS=[
"-fno-strict-overflow",
"-fno-delete-null-pointer-checks",
"-fwrapv",