152 Commits

Author SHA1 Message Date
kai
508bf67e2d Fix a gcc 4.4.7 issue and an LLVM 3.4 oversight. 2013-06-29 17:24:03 +02:00
kai
272230fe59 Make driver/toobj.cpp compatible with LLVM 3.4. 2013-06-29 17:11:14 +02:00
kai
707c134d6e Make ldmd source compatible with LLVM 3.4. 2013-06-29 16:10:52 +02:00
kai
8fb0b12e9e Replace llvm::sys::Path with llvm::SmallString in configfile.cpp.
Also adds some required functions for LLVM 3.4.
2013-06-29 15:10:30 +02:00
kai
cf88271ab9 Replace llvm::sys::Path with std::string.
In many cases this is straightforward. It makes the source LLVM 3.4 compatible without using #idef's.
2013-06-29 14:20:44 +02:00
kai
96601b33fa Fix ldmd for LLVM 3.4
The Path::canExecute() method is gone. As a first fix just copy the source.
2013-06-22 16:58:56 +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
David Nadlinger
31d85d0910 Merge pull request #398 from ldc-developers/merge-2.063
DMD 2.063.1 merge
2013-06-17 14:04:36 -07:00
David Nadlinger
235bb94878 Make -release only disable bounds checking in non-@safe code. 2013-06-17 13:31:21 +02:00
kai
683294cec9 Fix a typo in Linux code. 2013-06-16 17:57:25 +02:00
David Nadlinger
68798f06c8 Accept '.dd' pure DDoc files. 2013-06-16 00:39:47 +02:00
David Nadlinger
46b6fdd531 Implement '-main'. 2013-06-15 23:09:59 +02:00
David Nadlinger
bed6243481 LDC does not support -transition yet. 2013-06-15 22:57:57 +02:00
kai
f1c71e4bac Make ldc compatible with LLVM 3.4
Development of LLVM 3.4 started with a cleanup of the path class (PathV1).
The changes here let ldc compile at least with rev. 184039 of LLVM.
2013-06-15 19:52:29 +02:00
kai
9f921b25d9 Make ldmd compatible with LLVM 3.4
Development of LLVM 3.4 started with a cleanup of the path class (PathV1).
The changes here let ldmd compile at least with rev. 184039 of LLVM.
2013-06-15 19:13:45 +02:00
David Nadlinger
fd3c696d94 Call Expression::init() during startup.
Was added in 2.063.
2013-06-12 20:16:37 +02:00
David Nadlinger
292caa1438 Merge the 2.063 frontend. 2013-06-12 20:16:37 +02:00
David Nadlinger
b2f2afad29 LDMD: Made error message on compiler execution error clearer.
It is also triggered when the compiler exits with a signal, etc.
2013-06-07 03:20:32 +02:00
David Nadlinger
005f993982 Merge branch 'release-0.11.0'.
Conflicts:
	gen/llvmhelpers.cpp
2013-06-02 21:53:41 +02:00
David Nadlinger
ec59399e21 Change all URLs to point to wiki.dlang.org for the time being. 2013-06-02 21:27:02 +02:00
David Nadlinger
2617db0395 Merge pull request #346 from klickverbot/m32m64
Only specify -m32/-m64 for archs where the variants exist.
2013-05-31 12:10:49 -07:00
David Nadlinger
c02b38fe9a Removed LLVM 3.0 compatibility code.
There might be still some pieces left here and there, and
there is certainly code that could be rewritten in a nicer
way with the 3.0 requirement out of the picture.
2013-05-31 20:48:38 +02:00
Hans W. Uhlig
4f6204f191 Adding Space to Literal 2013-05-28 17:38:09 -07:00
kai
4343965106 Use /LARGEADDRESSAWARE:NO only for debug builds with LLVM 3.4.
Most of the LLVM bugs regarding relocations are fixed now.
2013-05-24 16:07:25 +02:00
David Nadlinger
edbace8ae8 Default to PIC on OS X.
driver/target.h is due for a refactoring after the next
release is branched off.
2013-05-19 21:19:37 +02:00
kai
a31d704941 Add missing include for Windows 2013-05-13 18:47:59 +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
fc8e0c4c20 Revert -float-abi implementation.
The new command line option conflicted with a builtin LLVM 3.0
one. The functionality will be added back in after the 0.11.0
release branch has been created.

This reverts commit 6a1bc70bd7 and
subsequent fixes.
2013-05-12 00:18:44 +02:00
David Nadlinger
23d82b9620 Only specify -m32/-m64 for archs where the variants exist. 2013-05-11 21:49:19 +02:00
David Nadlinger
8da8bdd209 LLVM pre-3.2 does not have llvm::Triple::Android.
Strangely enough, the Travis pull request status was
definitely green before I merged it in.
2013-05-11 21:44:05 +02:00
David Nadlinger
e37f0e0d35 Fix ARM default floating-point ABI.
It shouldn't really matter, as we probably aren't going to
support anything but AAPCS anytime soon.
2013-05-11 21:33:20 +02:00
David Nadlinger
6a1bc70bd7 Added -float-abi and auto-detection logic for ARM.
Even though this argument design conflates two separate concepts
(ABI and hardware/software implementation), I chose to go
with it since users are liekly know it from GCC and the
combination of softloat operations with hardfloat ABI makes
no sense.

I didn't implement it for old LLVM versions, as ARM EABI
exception handling requires LLVM 3.3+ anyway, without which
LDC would be useless anyway.
2013-05-11 21:07:54 +02:00
David Nadlinger
e5d6cf4dd8 Merge pull request #341 from klickverbot/default-target-cpu
Use generic target CPU by default
2013-05-09 13:16:02 -07:00
David Nadlinger
30bf4e121f Do not optimize for host CPU by default.
GitHub: Fixes #323.
2013-05-09 22:15:19 +02:00
David Nadlinger
251607a1df LLVM 3.3+: Initialize TargetTransformInfo. 2013-05-09 19:51:57 +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
51e1a6cb54 Replace hard-coded path with registry lookup on Windows.
A hard-coded path does not play nicely with a generic installer.
The installation path is now looked up in the registry with the
key SOFTWARE\\ldc-developers\\LDC\\<version>\\Path.
It is the responsibility of the installer to set this value.
2013-05-06 07:52:25 +02:00
kai
41bbc8fbf5 Rewrite the llvm::Linker fix for LLVM 3.3.
The previous commit changed the behaviour a bit. This solution should have an identical result.
2013-05-05 20:27:12 +02:00
kai
ebaa3f08b3 Fix LLVM 3.3 build error.
llvm/Linker.h was changed. This commit reflects the new logic.
2013-05-05 18:42:14 +02:00
kai
308919f371 Revert "Linker flag /LARGEADDRESSAWARE is not required with LLVM 3.3.".
There is still an issue left in LLVM. I need to investigate this further.
2013-04-20 14:07:30 +02:00
kai
d8aed3627e Linker flag /LARGEADDRESSAWARE is not required with LLVM 3.3.
With a recent commit support for the missing relocations was added.
This change removes the flag from the linker command line.
2013-04-15 07:08:46 +02:00
David Nadlinger
b8cdfad8c0 global.params.useAvailableExternally -> global.inExtraInliningSemantic.
This will hopefully make the associated code a bit easier
to read.
2013-04-01 21:17:13 +02:00
kai
b13f3d3164 Merge branch 'master' into merge-2.062
Conflicts:
	runtime/druntime
2013-03-24 19:39:39 +01:00
David Nadlinger
862ece3ca4 Fix -lib with fully specified output name and '-c'.
The whole output path handling code is in dire need of a
cleanup/rework.
2013-03-18 13:33:55 +01:00
David Nadlinger
bb5b60e591 Make '-O' equivalent to '-O3'.
I have seen it used several times in benchmarks comparing it
to 'gdc -O3' and 'dmd -O -inline' now, so people apparently
expect it to yield the highest available optimization level.
2013-03-17 02:09:54 +01:00
David Nadlinger
153caa9bf7 Print nice error message for wrong '-run' argument.
This fixes DMD test case 'diag6743'.
2013-03-16 14:02:01 +01:00
David Nadlinger
58908e044a Removed DMD code remnants from driver/main.cpp. 2013-03-16 13:37:07 +01:00
David Nadlinger
32eb24eebf Added '-Hkeep-all-bodies' switch.
The same behavior is triggered by the '-inline' switch for
DMD, but this doesn't quite translate to LDC.
2013-03-16 11:52:19 +01:00
David Nadlinger
74f92391c5 Merge branch 'master' into merge-2.062
Conflicts:
	runtime/druntime
2013-03-11 22:14:27 +01:00
jaten
6f6c776e9c initialize Params properly in constructor. 2013-03-11 00:38:43 -07:00