- Add new files and remove unused files.
- Only create .bc files if requested.
(Creating .bc and .obj files at the same time confuses the LIB tool. Maybe a CMake bug....)
- Add references to new commits for Win64 in druntime and phobos.
The Windows linker LINK insists on the .obj extension. The following changes are made:
- CMake uses the same extension as the C compiler
- global.obj_ext_alt (aka .obj) is recognized as objectfile extension
- global.obj_ext_alt is used on Windows
Note: Currently, we are not following a consequent strategy regarding which files to install and which to omit. In the future, we should either always install all of the modules (because they should have version() guards anyway), or omit all the files with paths containing {osx,windows,linux,freebsd} on the other OSes.
Also took the opportunity to rename liblphobos2 to libphobos2-ldc as discussed on IRC, because this highlights the relationship to DMD's libphobos2 better e.g. when browsing through the file system.
As discussed on IRC, Bob has been the default (and recommended) way to build Tango for LDC for quite some time now. Support for it in the CMake-based build system just created a big maintenance burden for (almost) no benefits. Besides, the build system was currently broken anyway.
The makefiles seemed to support building *.bc libs for Tango though, which Bob probably doesn't, which might be worth keeping in mind.
Previously, std.internal.processinit was missing, leading to linker errors on OS X. All platform-specific stuff is wrapped in version() blocks, so we should be fine.
In detail, this commit:
- Changes the default version that is built to D2, use D_VERSION to override.
- Reverts back to building static libs by default until we are certain shared libs work fine everywhere.
- Fixes installation pathes so that CMAKE_INSTALL_PREFIX is respected; /etc as sysconf dir for /usr prefix is special-cased.
- Fixes out-of-source builds again, and causes temporary files (idgen, …) not to be written to the source directory anymore.
This is a slightly cleaned up version of the changes from https://github.com/ldc-developers/ldc/pull/12.