Commit Graph

129 Commits

Author SHA1 Message Date
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
David Nadlinger
45365bb0ab Merged pull request #196 from branch 'jerro/upstream-master2'. 2012-10-14 04:58:56 +02:00
David Nadlinger
23e6720605 Build druntime/Phobos unit tests on make test. 2012-10-14 04:35:15 +02:00
Jernej Krempuš
f6cd185701 Generate gccbuiltins.di at build time.
Bug fixes.

Moved gen_gccbuiltins.cpp to util and renamed gccbuiltins.di to gccbuiltins_x86.di

Trying to fix Travis build.

Removed cstrVec.
2012-10-13 13:01:03 +02:00
David Nadlinger
c0980de3af Testsuite updates; run it as part of CI builds.
Only can run a quick build because of Travis time restrictions. Should
try to find a set of most-likely-to-fail command line args, maybe
"-O -gc -fPIC"?
2012-09-29 20:59:06 +02:00
kai
7c7a9e564a Add source_group.
This information is used by VisualStudio to group files togetther.
2012-08-26 15:28:35 +02:00
kai
2addbd2b71 More changes to the build system.
- Relax version checking because we intend to have only a single branch
- Exclude ldfpu.asm from build with MSVC-32 (reported by huynh van sen)
- Fix FindLLVM.cmake to work on Windows again
2012-07-28 22:41:34 +02:00
kai
508dd9ff70 Simplify CMakeLists.txt.
This version works with LLVM 3.0 and 3.1.
2012-07-24 23:33:15 +02:00
kai
32a2fff634 Add more compiler flags for MSVC. 2012-07-14 21:45:24 +02:00
kai
0d7c0869a5 Replace find-alt-triple.sh with CMake regular expressions.
This has the advantage that it works on Windows, too.
2012-06-25 23:42:58 +02:00
kai
0c6fcc12ec Revert "Fix some parameter lists." because it breaks Linux build.
This reverts commit 0c5bd04aab.
2012-06-22 06:59:12 +02:00
kai
0c5bd04aab Fix some parameter lists.
With this commit it is possible to build LDC/LDC2 with MSVC via CMake.
2012-06-21 06:44:52 +02:00
kai
79c02f2a79 Remove some old variables which are unused now. 2012-06-19 18:08:42 +02:00
kai
c5eba4a98b New CMake module to locate libconfig++
The current code to locate libconfig++ has some trouble:
- It is located in the main CMakeList file but should be a module of its own
- It depends on pkg-config which is not available on Windows
- The returned values are not really useful therefore the library name is hard coded

This commit tries to solve these problems. For a Unix-like system there should be no difference.
Additionally, you can override the variables on the command line which is useful for builds on Windows.
2012-06-18 19:50:11 +02:00
kai
920c563c7e More MSVC related changes to CMakeLists.txt.
- Added new variable for MSVC specific compiler flags
- Added custom target for MASM support
2012-06-18 19:21:58 +02:00
kai
93b2334803 Add more MSVC stuff to CMake files. 2012-06-15 12:20:02 +02:00
kai
95cb8af435 No need to exclude non-existing file root/win32.c from build. 2012-06-13 07:14:29 +02:00
David Nadlinger
27349f3589 Add LLVM_LDFLAGS twice to the LDMD link command to work around build problems. 2012-06-11 00:31:55 +02:00
David Nadlinger
7652fb8015 Explicitly include <unistd.h>. 2012-06-11 00:31:54 +02:00
David Nadlinger
9489508046 Write LDMD executable to bin/. 2012-06-10 22:19:54 +02:00
David Nadlinger
6ced6dae77 Fix #45, fix #100: LDMD rewrite for more sophisticated emulation of DMD command line behavior.
It ain't pretty. I know.
2012-06-07 11:17:39 +02:00
David Nadlinger
96b7fb6336 Always cache libconfig++ flags; tell user if pkg-config could not be found.
Previously, it was not clear to the user if pkg-config detection failed, leading to surprises if libconfig++ actually was present on the system.

The LIBCONFIG* variables are now always cached so that they can conveniently be set from ccmake/cmake-gui.
2012-06-02 15:43:14 +02:00
David Nadlinger
1f5bced327 Don't install libldc for static builds. 2012-05-25 19:41:53 +02:00
David Nadlinger
8dea63e8a8 Fix #98 - Build broken using CMake 2.8.8.
As per the CMake docs, LANGUAGE is only to be set for files that are actually compiled. In versions prior to 2.8.7, setting it globally worked fine nevertheless.
2012-05-25 19:07:57 +02:00
Eldar Insafutdinov
36d4a57297 Default to building ldc as a static library. Added BUILD_SHARED flag to enable dynamic libraries 2012-04-07 14:12:10 +01:00
Eldar Insafutdinov
a8398d64e8 Moved configfile to the driver 2012-04-03 21:18:16 +01:00
Eldar Insafutdinov
0b411b873c Separated compiler from the driver into the shared library 2012-04-01 22:06:08 +01:00
David Nadlinger
df61269ada Fixed LDC 1 config file installation.
Closes #79.

Thanks to SiegeLord for the meat of the patch.
2012-03-17 13:32:00 +01:00
David Nadlinger
c3621e171c CMake: Mark USE_BOEHM_GC and other unsupported flags as advanced. 2012-03-17 12:28:49 +01:00