Force building embree with "generic" arch to avoid avx errors
When user passes ccflags="-march=native" or any other compiler cpu target which supports avx we will get errors because embree is compiled partially without AVX support but expects it to be present Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
This commit is contained in:
parent
af77100e39
commit
c776189af9
1 changed files with 5 additions and 1 deletions
|
@ -68,7 +68,11 @@ if env["builtin_embree"]:
|
|||
|
||||
if not env.msvc:
|
||||
if env["arch"] in ["x86_64", "x86_32"]:
|
||||
env_raycast.Append(CCFLAGS=["-msse2", "-mxsave"])
|
||||
# Force building embree with "generic" arch to avoid compilation errors with
|
||||
# unresolved avx instruction support when user passes ccflags="-march=native"
|
||||
# or any other compiler cpu target which supports avx
|
||||
normalized = env["arch"].replace("_", "-")
|
||||
env_raycast.Append(CCFLAGS=["-msse2", "-mxsave", "-march={}".format(normalized)])
|
||||
|
||||
if env["platform"] == "windows":
|
||||
env_raycast.Append(CCFLAGS=["-mstackrealign"])
|
||||
|
|
Loading…
Reference in a new issue