clang-cl + google sanitizers
已回答
Hi, i'm triying to compile with clang-cl and AddressSanitizer enabled , but nothing seems to work.
clang-cl: warning: unknown argument ignored in clang-cl: '-g' [-Wunknown-argument]
clang version 10.0.0
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\PROGRA~1\LLVM\bin
clang-cl: error: invalid argument '-MDd' not allowed with '-fsanitize=address'
clang-cl: note: AddressSanitizer doesn't support linking with debug runtime libraries yet
NMAKE : fatal error U1077: 'C:\PROGRA~1\LLVM\bin\clang-cl.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
请先登录再写评论。
Hi Fabio,
Thank you for the post! We've added an instruction to our web help: https://www.jetbrains.com/help/clion/google-sanitizers.html#clang-cl-configure.
Hi Anna,
thanks for your reply.
I hade found a similar fix for the "stand-alone" version of clang.
I have tested both with an example from docs and got the same result: i have no errors compiling in "release mode", but i can't see any log or visual representation for output