Some LLVM libs were missing from the linker flags for current LLVM 5.0.
It was only during troubleshooting that I noticed the MSVC special case in
FindLLVM.cmake. Getting rid of it entirely made the issues disappear. I
checked llvm-config.exe, and it's returning appropriate switches for the
MS toolchain, no need for special processing.
This apparently also leads to LLVM_CXXFLAGS being used for the first time
when building with MSVC. These include /W4, a level further up from
CMake's default /W3, so I disabled a few more frequent warnings.
I also had to link in a lib from Microsoft's Debug Info Access SDK
manually. As the VS command prompt unfortunately doesn't even include the
DIA SDK dir in the LIBPATH environment variable, I even had to specify a
full path, relying on the `VSINSTALLDIR` environment variable.
* Travis: add LLVM 4.0 testing
* CMake: remove the `-Wstring-conversion` cxxflag, added in LLVM 4.0, that is not recognized by gcc-4.9 on Travis.
* CircleCI: With Travis testing 4.0, move CircleCI back to testing LLVM trunk
By directly integrating LLVM's `llvm-lib.exe` driver to generate static
libs for MSVC targets and a stripped-down version of the `llvm-ar` tool
for the other targets.
Introduce command-line option `-archiver=<file>` to allow the user to
specify an external archiver to be invoked.
For MSVC each LLVM library was prefixed with the absolute path of the
library location. This leads to problems with the command line length.
This PR uses "-LIBPATH:" as link flag for the LLVM libraries and
only appends the suffix .lib to the library names.
It is important to handle the command line options in the right way.
Otherwise spaces in paths may be lost.
A special problem is the automatic conversion of linker options starting
with "-" to "/". If the linker argument does not start with "-" then the
argument is not considered as a link flag. On the other hand if "-" is
used then the prepending of "-L" for LDC does not generate a valid option.
For MSVC each LLVM library was prefixed with the absolute path of the
library location. This leads to problems with the command line length.
This PR uses "/LIBPATH:..." as link flag for the LLVM libraries and
only appends the suffix .lib to the library names.
The problem is that `llvm-config --libs tablegen` returns `-lLLVM-3.8.0` but the
code of the tablegen component is not included in this library.
Current solution is to add `-lLLVMTableGen` to the list of libraries.
LLVM 3.5 requires use of C++11. The gcc compiler requires a flag to use C++11.
The easiest way to pass this flags is to uses the flags returend by llvm-config.
Using llvm-config with mingw requires some path fiddeling because of the mixed
Windows and Unix conventions.
- Fix typo in comment
- Removes traces from LLVM 3.0 support
- Fix the regular expression used to match LLVM version
- Add support for LLVM 3.6 config tool