Describe the issue
When compiling Abseil master with /arch:AVX2 then this build error occurs:
crc_x86_arm_combined.cc(376): error C3861: '__asm__': identifier not found
This is compiler's command line:
cl.exe /nologo /TP -DABSL_BUILD_DLL -DNOMINMAX -Dabseil_dll_EXPORTS -IAbseil\msvc17-amd64-debug-shared\Abseil /DWIN32 /D_WINDOWS /GR /EHsc /Ob0 /Od /arch:AVX2 /RTC1 -std:c++17 -MDd -Zi /W3 /bigobj /wd4005 /wd4068 /wd4180 /wd4503 /wd4800 /DNOMINMAX /DWIN32_LEAN_AND_MEAN /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /D_ENABLE_EXTENDED_ALIGNED_STORAGE /showIncludes /Foabsl\CMakeFiles\abseil_dll.dir\crc\internal\crc_x86_arm_combined.cc.obj /Fdabsl\CMakeFiles\abseil_dll.dir\ /FS -c Abseil\absl\crc\internal\crc_x86_arm_combined.cc
Steps to reproduce the problem
Build master branch with CMake and Visual Studio 2022.
What version of Abseil are you using?
Abseil master branch
What operating system and version are you using?
Windows 11 25H2
What compiler and version are you using?
Visual Studio 2022 / version 19.44.35228 for x64
What build system are you using?
cmake version 3.31.12
Additional context
The problem was introduced in commit b85d169.
This style of inline assembler is not supported by MSVC.
The problem occurs only when enabling AVX or higher instruction set.
Describe the issue
When compiling Abseil master with /arch:AVX2 then this build error occurs:
crc_x86_arm_combined.cc(376): error C3861: '__asm__': identifier not foundThis is compiler's command line:
cl.exe /nologo /TP -DABSL_BUILD_DLL -DNOMINMAX -Dabseil_dll_EXPORTS -IAbseil\msvc17-amd64-debug-shared\Abseil /DWIN32 /D_WINDOWS /GR /EHsc /Ob0 /Od /arch:AVX2 /RTC1 -std:c++17 -MDd -Zi /W3 /bigobj /wd4005 /wd4068 /wd4180 /wd4503 /wd4800 /DNOMINMAX /DWIN32_LEAN_AND_MEAN /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /D_ENABLE_EXTENDED_ALIGNED_STORAGE /showIncludes /Foabsl\CMakeFiles\abseil_dll.dir\crc\internal\crc_x86_arm_combined.cc.obj /Fdabsl\CMakeFiles\abseil_dll.dir\ /FS -c Abseil\absl\crc\internal\crc_x86_arm_combined.ccSteps to reproduce the problem
Build master branch with CMake and Visual Studio 2022.
What version of Abseil are you using?
Abseil master branch
What operating system and version are you using?
Windows 11 25H2
What compiler and version are you using?
Visual Studio 2022 / version 19.44.35228 for x64
What build system are you using?
cmake version 3.31.12
Additional context
The problem was introduced in commit b85d169.
This style of inline assembler is not supported by MSVC.
The problem occurs only when enabling AVX or higher instruction set.