(fwZip): fail to compile with Clang
Summary
Compiling fails with Clang 8:
/home/fbridault/dev/sight/src/sight/SrcLib/core/fwZip/src/minizip/aes_ni.c:135: erreur : '__builtin_ia32_aeskeygenassist128' needs target feature aes t2 = _mm_aeskeygenassist_si128(t1, 0x1); ^
Dev environment
- OS: Linux
- CMake version: 3.16.6
- Compiler: clang 8
- Build type: debug
- Commit: 95a33b9f
Possible fixes
Adding the flag AES manually works but then fails when compiling cpp files in the target:
FAILED: fwZip/CMakeFiles/fwZip.dir/src/fwZip/exception/Write.cpp.o /usr/bin/clang++-8 -DBOOST_ALL_DYN_LINK -DFWZIP_EXPORTS -DFWZIP_VER="0.1" -DHAVE_AES -DINCLUDECRYPTINGCODE_IFCRYPTALLOWED -DKEEP_OLD_SERVICE -DSPYLOG_LEVEL_fwZip=4 -DUSE_INTEL_AES_IF_PRESENT -D_GLIBCXX_USE_CXX11_ABI=1 -I/home/fbridault/dev/sight/src/sight/SrcLib/core/fwZip/include -IfwZip/include -I/home/fbridault/dev/sight/src/sight/SrcLib/core/fwCore/include -IfwCore/include -isystem /home/fbridault/.conan/data/boost/1.69.0-r4/sight/stable/package/eedfc6186f44b3f46936babef177d5192dd3b6d7/include -g -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -march=sandybridge -mtune=generic -mfpmath=sse -O0 -g3 -D_DEBUG -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wconversion -Wno-unused-parameter -Wno-ignored-qualifiers -fcolor-diagnostics -maes -std=gnu++17 -Winvalid-pch -include-pch "/home/fbridault/dev/sight/build/debug/pchCore/include/pchCore/pch.hpp.pch" -MD -MT fwZip/CMakeFiles/fwZip.dir/src/fwZip/exception/Write.cpp.o -MF fwZip/CMakeFiles/fwZip.dir/src/fwZip/exception/Write.cpp.o.d -o fwZip/CMakeFiles/fwZip.dir/src/fwZip/exception/Write.cpp.o -c /home/fbridault/dev/sight/src/sight/SrcLib/core/fwZip/src/fwZip/exception/Write.cpp error: current translation unit is compiled with the target feature '+aes' but the AST file was not 1 error generated.