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.
Also adds the CMake infrastructure to compile and link the D source files.
The build is partially broken:
- A few files in Phobos and druntime do not build
- MSVC build is broken because of unresolved symbols involving reals
The problem from issue #874 has another variant:
If .git/logs/refs/heads/merge-2.067 exists then this ref is
returned as hash value(!). This is plain wrong. Solution is
again to look up `.git/packed-refs`.
After running `git gc` cmake may fail to configure the build.
`git gc` deleted the file `.git/refs/head/merge-2.067` (my current branch) and
moved the reference into file `.git/packed-refs`. This file is not parsed for
the reference.
Solution is (a) parse `.git/packed-refs` if ref is not found or (b) use
git rev-parse --symbolic-full-name HEAD
to get the reference and
git show-ref --hash ${HEAD_REF}
to get the hash.
This commits uses solution (a).
Allow ldc to be a submodule. This uses changes from
https://github.com/rpavlik/cmake-modules.
(cherry picked from commit 0be5ead42e6049f8e51453a82a17b1770646a1a2)
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.
libconfig++ is only a thin wrapper around libconfig. Because of the
use of exception handling this wrapper requires more memory than needed.
As we have our own wrapper (ConfigFile) just drop the C++ stuff.
- 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
FindGit doesn't seem to work as expected on Ubuntu 10.04
(GIT-NOTFOUND even though Git is installed and available
on the $PATH).
This implementation might be overly simplistic and it
should probably use find_program() to locate Git. We need
to revisit this after the 0.12.0 release is out.
This allows for building of release packages without
manually overriding the version string.
The --tag argument is needed to pick up un-annotated tags
as well.
CMakeLists.txt contains now the version numbers for DMD and (next) LDC release.
If a .git folder is found then the LDC version is replaced by the first 6 chars
of the Git revision.
Possible improvements:
- If the build is not done at the master branch then it could be useful to check for a tag and use the tag instead of the revision. (for release builds)
- Maybe it is useful to include the branch name.
This fixes issue #366.