Adds libomp.lib for -fopenmp=libomp and libiomp5md.lib for -fopenmp=libiomp5 on Windows
Details
Diff Detail
Event Timeline
OpenMP/linking.c fails here with VS2015 (building with -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp)
Command 21 Stderr:
C:\cygwin64\home\ismail\src\llvm\tools\clang\test\OpenMP\linking.c:75:24: error: expected string not found in input
// CHECK-MSVC-LINK-64: "link.exe"
^
<stdin>:1:1: note: scanning from here
clang version 3.8.0 (http://llvm.org/git/clang d7efa4b285d2464f1844b52b220381c64cd64bf6) (http://llvm.org/git/llvm bee32461e9d
466ed85439a026c62cb896b638653)
^
<stdin>:6:73: note: possible intended match here
"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64\\link.exe" "-out:C:\\cygwin64\\home\\ismail\\src\\llvm
\\dist\\tools\\clang\\test\\OpenMP\\Output\\linking.c.tmp.o" "-defaultlib:libcmt" "-libpath:C:\\Program Files (x86)\\Microsoft
Visual Studio 14.0\\VC\\lib\\amd64" "-libpath:C:\\Program Files (x86)\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\x64" "-nologo" "-
nodefaultlib:vcomp.lib" "-nodefaultlib:vcompd.lib" "-defaultlib:libomp.lib" "C:\\cygwin64\\tmp\\linking-19e90e.o"
^
Tests pass but, now when I tried to compile a file with -fopenmp I get:
LINK: fatal error LNK1104: cannot open file 'libomp.lib'
libomp.lib does exist in "C:\Program Files\LLVM\lib" but I guess we need to pass the library path down to linker.
This is a default installation so the lib path is $PATH_TO_CLANG_EXE/../lib which in my case is C:\Program Files\LLVM\lib
Great work. Tested fine on Windows. Next step would be mapping /openmp flag to -fopenmp but I guess thats for another bug.