I am currently trying to use clang compiler on Windows 7 (64bit), I have built LLVM and clang from sources (master branch) using VS 2015.
Now I am trying to rebuild the LLVM and clang using clang itself.
So I am stuck setting correct configuration for cmake.
I am running the following command:
$ cmake .. -G "Ninja" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER_ID=Clang -DCMAKE_CXX_COMPILER_ID=Clang
And after that the first test fails with linkage error:
CMakeFiles\cmTC_8f103.dir\testCCompiler.c.obj -o cmTC_8f103.exe
-Wl,--major-image-version,0,--minor-image-version,0 && cd ."
LINK : warning LNK4044: unrecognized option '/-out-implib'; ignored
LINK : warning LNK4044: unrecognized option '/-major-image-version';
LINK : warning LNK4044: unrecognized option '/-minor-image-version';
LINK : fatal error LNK1181: cannot open input file 'libcmTC_8f103.dll.a'
clang.exe: error: linker command failed with exit code 1181 (use -v to see
I have found similar bug:
However it is for WinXP and is marked as already fixed.
Also here is similar unsolved discussion SO: Building c++ project on Windows with CMake, Clang and Ninja - Stack Overflow
Here is clang version which I am trying to use:
$ clang --version
clang version 3.9.0
Thread model: posix
It would be great is somebody could point me on what am I doing wrong?
Thanks in advance!