How can I configure LLVM Clang 6.0 with CLION 2018.1
已回答
Hi,
Please help me on this matter,I tried some attempts and failed,I am newby to CMAKE kind of stuff, need your assistance regarding this issue.
I downloaded clang form here.
Currently, CLion 2018.1 support this VisualStudio,MinGW,Cygwin and WSL (configurations)platforms only,
Where I was stuck, when it is required to given makefile absolute paths,
Here a snapshot of that,
Please help me on this matter! If you can support me by step by step instruction it would be a great help. I really love CLion IDE.
Please, Jetbrains CLion team can you give us user-friendly support for clang compiler with next release onwards?
请先登录再写评论。
Hello!
As you correctly mentioned, to work with CLion on Windows you need to have Cygwin, or MinGW, or Windows Subsystem for Linux (WSL), or Visual Studio. If you want to use Clang, you need to install Cygwin or MinGW and to install Clang as a MinGW/Cygwin package. For example, in this comment you can find a detailed instruction for MinGW.
Thank you Anna for the reply, So don't we have an option to configure official clang x64 release for windows with CLion?
You can't use clang in CLion on Windows without having MinGW or Cygwin installed. You can try the following:
1) Install MinGW or Cygwin and specify it in the "Environment" field in File | Settings | Build, Execution, Deployment | Toolchains.
2) Specify installed clang.exe and clang++.exe in the "C Compiler" and "C++ Compiler" fields (like you do it now) if it's crucial for you to use this particular distribution.
@Anna Can we use LLDB with CLION 2018 ? or Only GDB supported on Windows Environment? and another thing is since Valgrind has no Windows build, how to run memcheck and profiling?
Please look at the image below

Error saying "Error running "Build All": Valgrind executable is not found". Please need your help on this.
>Can we use LLDB with CLION 2018 ?
LLDB is bundled only for macOS and Linux. Since the LLDB on Windows is still under development, we don't test nor explicitly support this configuration. If you manage to set it up for your case, chances are CLion will also be able to use it.
>Valgrind has no Windows build
Valgrind Memcheck in CLion works on Windows only via WSL. Please see the related blog post for more details.
@Anna thank you very much for the support.
In fact the latest version of Clions 2018.2 running on windows 10 environment work with LLVM clang version 6/6.0.1 or even 7.0 couple with GCC mingw x64 win32 specific variant.
Please select the right toolchain in your project setting as either
x64 or 32 specific version which have tested to work on Clions/windows environment
C:\mingw-w64\x86_64-8.1.0-win32-seh-rt_v6-rev0 or C:\mingw-w64\i686-8.1.0-win32-dwarf-rt_v6-rev0
and also setting the right target for LLVM clang with gcc default linker not visual studio
CMake build setup as below
Also we have a feature request about supporting Clang in CLion on Windows (without MinGW or Cygwin): https://youtrack.jetbrains.com/issue/CPP-10711. Feel free to comment or upvote it in order to get updates.
Installed clang and lldb in msys2-mingw distribution, when select lldb as debugger and try to debug I get:
@Msink, LLDB on Windows is still not supported in CLion. Please follow updates in our blog to be aware of changes on this subject.