Xcode c++ project build fails for Profile mode (Release configuration)

Viewed 61

I have a C++ CLI project in Xcode that compiles and runs fine for "Run" and "Analyze" mode (Debug configuration), but the build fails for "Profile" mode (Release configuration) with so many errors like the following:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/ia32intrin.h:288:10: Use of undeclared identifier '__builtin_ia32_crc32qi'

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:33:5: Use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'?

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/hresetintrin.h:42:27: Invalid input constraint 'a' in asm

Any help is much appreciated!

1 Answers

Figured it out.

The issue seems to be Apple Silicon architecture (I have Intel). So I changed the option for "Build Active Architecture Only" for Release to "Yes" from "No" and it solved the issue.

Related