-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zig c++ overrides explicitly set cpu features #9196
Comments
I think this is a matter of missing support for -m flag detection in general. It would be near trivial to solve it for -mxop, but the real question is how do we systematically solve it for all such parameters? |
There's something that is correctly adding Tried the same thing with Is there a way to disable emitting flags for the detected cpu? (Update): It seems the |
We ran into this issue while trying to build set_source_files_properties(
${VPX_GLOB_CPP_AVX}
PROPERTIES COMPILE_FLAGS
"-mavx2")
set_source_files_properties(
${VPX_GLOB_CPP_SSSE3}
PROPERTIES COMPILE_FLAGS
"-mssse3")
set_source_files_properties(
${VPX_GLOB_CPP_SSE2}
PROPERTIES COMPILE_FLAGS
"-msse2") but We worked around this by creating a wrapper for |
Fixed now:
|
Ah this was a duplicate of #4912 btw. |
I was trying to build tensorflow with
zig c++
on an intel kabylake processor and building a dependency (xnnpack) failed when compiling a source that was using XOP intrinsics. Their cmake build was adding-mxop
when compiling the appropriate files. The build worked withclang++
. I was able to narrow this down to a small test case:Running with
-v
shows that zig sets the xop features twice (once+xop
and later-xop
) :... -target-cpu x86-64 -target-feature +xop -tune-cpu generic ... -target-cpu skylake ... -target-feature -xop ...
Not sure if this was happening due to native cpu detection, but I tried adding
-target x86_64-linux-gnu
to pretend to cross-compile, but it didn't help. Am I using this wrong? Is there a workaround or fix I could try?Thanks!
The text was updated successfully, but these errors were encountered: