context icon indicating copy to clipboard operation
context copied to clipboard

Fix `clang-cl` `MSVC` frontend received `GNU` flag on assembling

Open Challanger524 opened this issue 10 months ago • 2 comments

PR for #293

Put if (GNU/Clang) into the MASM's else clause since Clang-CL validates positive at CMAKE_CXX_COMPILER_ID STREQUAL "Clang" while also having MSVC frontend for compile options and utilising ML masm assembler.

UPD: clang-cl /quiet support has been dropped due to inability to know real version for sure. Side (weird) fix for /quiet flag being passed on MSVC_VERSION: 1936 despite Visual Studio Enterprise 2019 Version 16.11.35:

Dropping context
  • Visual Studio Enterprise 2019 Version 16.11.35
  • (Microsoft (R) Macro Assembler (x64) Version 14.29.30154.0)
  • message(STATUS "MSVC_VERSION: ${MSVC_VERSION}") = -- MSVC_VERSION: 1936 report
  • despite doc says that: /quiet Suppresses 'Assembling' message. Available in Visual Studio 17.6 and later. Looks like CMake gives wrong MSVC_VERSION for clang-cl.

Tested

On MS Windows with CMake with next compilers: MSVC, msys2/mingw64/GCC, msys2/clang64/Clang, Clang-CL (chocolatey install)

Challanger524 avatar Feb 22 '25 16:02 Challanger524

@marakew can you copy patch to your boost::context and validate?

Challanger524 avatar Feb 22 '25 16:02 Challanger524

seems works

marakew avatar Feb 22 '25 17:02 marakew

@olk how about merge ?

marakew avatar Apr 15 '25 14:04 marakew

ty

olk avatar Apr 17 '25 04:04 olk