157 Commits

Author SHA1 Message Date
Kai Nacke
e69b1ebb28 Change compiler options for MSVC.
This fixes issue #458.
2014-01-12 22:42:34 +01:00
Kai Nacke
58305e8bfc Remove DigitalMars garbage collector.
This code is not used and gone in later DMD versions.
2014-01-03 15:47:07 +01:00
Kai Nacke
5b14263d67 Add CMAKE_DL_LIBS to link command. 2013-12-19 20:35:25 +01:00
Kai Nacke
62137ca489 ldmd2 requires -lpthread and -lcurses, too.
This is a change to the LLVM CMake files from LLVM 3.5.
2013-12-19 19:16:08 +01:00
Kai Nacke
14ae04c573 Check for terminfo libary.
This fixes another link error on my ARM device.
2013-12-18 22:47:11 +01:00
Kai Nacke
c4cd972a6f Use logic of LLVM to detect pthread library.
But still need to check if LLVM uses pthreads.
2013-12-18 22:25:13 +01:00
Kai Nacke
e82bd4614c Check for pthreads library.
This fixes a link error on my ARM devices.
2013-12-18 21:36:00 +01:00
Kai Nacke
d4f8092dde Support LLVM 3.5.
LLVM 3.5 adds a new required component lto.
2013-12-13 07:41:22 +01:00
Kai Nacke
5bf42f86aa Remove -Werror from LLVM_CXXFLAGS.
This flag causes compile errors we can't fix.
2013-10-25 23:30:32 +02:00
Kai Nacke
e6ffffdace Files from DRV_SRC and DRV_HDR should be compiled with same flags as other files. 2013-10-23 01:26:28 +02:00
Kai Nacke
6c7cedc484 Build LDC with address sanitizer enabled.
This commit adds an option to cmake to enable the address sanitizer if LDC is build with clang.
Specify -DSANITIZE=ON on the command line.
2013-10-21 19:49:39 +02:00
David Nadlinger
ad126e7155 Fix Git tag -> version string conversion on CMake 2.8.0.
This version is notably shipped with Ubuntu 10.04 LTS, used
for building the Linux release binaries.
2013-10-21 23:35:15 +02:00
David Nadlinger
f9e141a006 Prefer named tags to Git revision hashes for LDC verison.
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.
2013-10-09 16:05:29 +02:00
David Nadlinger
68c272d6d9 Renamed driver/target to .../targetmachine to avoid confusion with the frontend file. 2013-10-06 01:33:28 +02:00
Joseph Rushton Wakeling
9520eb967e Ensure LLVM LDFLAGS are placed after libraries in build commands. 2013-08-20 17:42:43 +02:00
kai
72ddd21814 Head is now at 2.063.2
Increment version number and add phobos changes.
2013-06-30 17:17:16 +02:00
kai
9facd2592b Centralize version numbers.
The top level CMakeLists.txt file should be the only file containing version informations.
2013-06-23 16:08:21 +02:00
kai
1d607fab62 Fix issues with spaces / line endings 2013-06-23 16:04:43 +02:00
kai
aa143b560c Include Git revision in version info.
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.
2013-06-21 06:47:32 +02:00
kai
40926eaba5 Add detection of used Linux distribution.
This information is then used to put the bash completion files into the right directory.
2013-06-16 23:06:50 +02:00
David Nadlinger
43e27d0dd1 Remove USE_METADATA.
It has been on by default for quite some time now.
2013-06-07 02:48:53 +02:00
kai
0a749b142a Add -mminimal-toc if compiling with gcc on ppc64.
Also adds an utility function to append a new value to a variable.
2013-06-01 22:13:37 +02:00
kai
b2a63c534d MSVC: gnuc.c/.h are no longer there 2013-06-01 21:40:50 +02:00
David Nadlinger
54696e3d3c Reflect the LLVM 3.1+ requirement in the CMake build system. 2013-05-31 22:33:21 +02:00
David Nadlinger
db270a9a94 Replaced response_expand with BSD-licensed reimplementation.
Cleanup to follow later.

GitHub: Fixes #267.
2013-05-12 13:38:23 +02:00
David Nadlinger
56e35e31a0 Factored out target creation logic to separate functions.
Care was taken to avoid dependencies on the host of
command line globals.

std::string should probably replaced by llvm::StringRef
in some places.
2013-05-09 17:27:35 +02:00
kai
afb673e5a4 Add core/threadasm.S to druntime.
This is required for PPC and MIPS targets. Results in an empty
object file on other CPU architectures.
2013-03-30 14:29:58 +01:00
kai
32af000854 Simple part of removing D1 2013-03-06 18:18:00 +01:00
David Nadlinger
243083b88c Factored out tool invocation code into separate file. 2013-02-13 00:07:48 +01:00
kai
55560bf382 Make frontend endian-aware.
In many parts the DMD frontend assumes a little endian CPU. In some
parts there are checks for endianess but they are incomplete and the
used definition is wrong. (Test for endianess will be removed in dmd
2.062.)
In this commit I add the required #if's and also add a CMake test for
endianess because there is no single compiler definition to check for.
2013-01-21 08:41:21 +01:00
kai
272e7b7a55 Follow "The Great Renaming" in LLVM 3.3
This time VMCore was renamed to IR. Several top level include
files were moved to new subfolder IR.
2013-01-03 08:52:23 +01:00
David Nadlinger
4da1427c19 Enable USE_METADATA by default. 2012-12-20 23:52:25 +01:00
David Nadlinger
06f9efd763 Enable -Wextra by default. 2012-12-20 01:21:10 +01:00
David Nadlinger
fca550e534 Cleanup: Remove warning overrides and fix two more warnings. 2012-12-20 01:00:57 +01:00
David Nadlinger
87a4fd06d5 Enable -Wall only for LDC-specific parts of the code.
LDC files including DMD headers are still not handled.
2012-12-19 23:21:47 +01:00
David Nadlinger
e174916328 Don't create unused gen/ directory. 2012-12-19 23:08:47 +01:00
kai
d9bf7d717b Add more quotes to CMakeLists.txt.
A recent changes in LLVM 3.3 triggered this one.
2012-12-16 20:21:17 +01:00
David Nadlinger
796c71255a Bump required CMake version to 2.8.
This is just a precautionary measure to avoid frustration on the
end user side, as older versions have not been tested in ages,
and will probably not work.
2012-12-11 23:08:13 +01:00
David Nadlinger
d6c2c83bb6 Fix '-fno-rtti' removal for tablegen tools.
Also just remove it on pre-3.2 builds.
2012-12-11 19:55:34 +01:00
David Nadlinger
48f476dcbe Consistently drop conditions in else/end CMake statements. 2012-12-08 18:15:47 +01:00
David Nadlinger
213ae8da16 Remove stale comment. 2012-12-08 18:08:25 +01:00
Jernej Krempuš
7bbe782615 Pragma llvm_inline_ir
Adding pragma llvm_inline_ir.

Improved the error messages.

Append "ret void" when the return type is void

Improved the error message

in case when the string passed as llvm inline ir isn't valid llvm
assembly language.

LLVM 3.2 fix.

Add attribute AlwaysInline inside DtoInlineIRFunction.

Always generate a body for llvm_inline_ir

Also, always make llvm_inline_ir functions linkonce_odr. Because
the body is always generated when a module uses a llvm_inline_ir
function, the fact that the linker removes the function shouldn't
cause problems.
2012-11-08 22:05:15 +01:00
kai
141dfa338e Add a post build event in Visual Studio to copy the config file ldc2.conf into Debug/Release folder.
This is required to build druntime and phobos with msbuild and Visual Studio.
2012-10-19 22:11:31 +02:00
kai
add8e91653 Locate Intrinsics.td in CMakeLists.txt.
The LLVM_INCLUDE_DIR is not always defined (e.g. missing in Windows). We simply locate the file and pass the folder path to the tool.
2012-10-18 07:12:13 +02:00
David Nadlinger
7674e4292f Fixed GitHub #204 – TableGen requires RTTI. 2012-10-17 20:36:47 +02:00
kai
434d56b4db Fix link error on Travis Cl. 2012-10-17 08:39:41 +02:00
kai
e7d5628370 Change CMakeLists.txt to compile gen_gccbuiltins with MSVC, too. 2012-10-17 07:13:20 +02:00
kai
641f0f9964 Extend copile support for MSVC.
- Add an option to choose between dynamic or static library version of libconfig++
- Add an option to choose linking the runtime against dynamic or static CRT library
2012-10-17 06:56:52 +02:00
kai
79e0b53fe7 Retrieve location of gen_gccbuiltins from CMake.
This is required for the MSVC build because binaries are placed in a Debug or Release folder.
2012-10-15 18:32:01 +02:00
David Nadlinger
95121115d3 gen_gccbuiltins cleanup. 2012-10-14 05:09:15 +02:00