Commit Graph

116 Commits

Author SHA1 Message Date
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
kai
11786aeb35 Remove last traces of _DH.
With the merge of 1.072 the definition of _DH is no longer needed.
2012-02-04 20:36:59 +01:00
Alexey Prokhin
7da47c4ee8 Restored old behavior of initialization of llvm targets.
LDC initializes only a llvm host target and targets that were explicitly
requested when building the program.
2011-12-05 21:41:37 +04:00
David Nadlinger
38d1bf4cc8 Removed two (!) D1/Tango runtime build systems.
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.
2011-12-04 20:21:56 +01:00
David Nadlinger
3916835380 Merge remote-tracking branch 'AlexeyProkhin/master' into merge-3.0
Conflicts:
	CMakeLists.txt
	druntime
	runtime/CMakeLists.txt
2011-12-04 18:38:09 +01:00
David Nadlinger
5458ebb0b2 Merge branch 'master' into merge-3.0 2011-12-04 18:15:21 +01:00
Alexey Prokhin
91f4e5d015 Added emission of dwarf lexical blocks.
Also, dropped support for DISABLE_DEBUG_INFO definition.
2011-12-04 15:34:35 +04:00
Alexey Prokhin
cdeca718fc Merge branch 'master' of github.com:ldc-developers/ldc 2011-12-04 00:16:30 +04:00
q66
04ce6bbe45 Build system fix. 2011-12-03 12:21:12 +01:00
Alexey Prokhin
014d6bdd4d Merged 2.056 2011-12-02 21:50:52 +04:00
Alexey Prokhin
7d74a801bb Fixed #17 and #23 — added 'MULTILIB' option to cmake script and fixed 'make install' 2011-12-02 21:40:31 +04:00
David Nadlinger
b560e752f3 LLVM 3.0 is now required. 2011-11-12 19:51:40 +01:00
David Nadlinger
dc46ae547c Merge remote-tracking branch 'upstream/ldc-merge-2.056'. 2011-11-12 19:31:19 +01:00
David Nadlinger
23f360c988 Use llvm::InitializeNativeTargetAsmPrinter() now that it is available.
This enables us to remove the whole ugly config file parsing hack.

Also includes some minor CMake beautifications (nobody should really be at 2.4 anymore, 2.6 is more than three years old now).
2011-11-12 18:42:01 +01:00