Commit Graph
214 Commits
Author SHA1 Message Date
Kai Nacke 731f2a8fdf Merge branch 'master' into merge-2.064
Conflicts:
	dmd2/root/rmem.c
2014-01-03 15:56:01 +01:00
Kai Nacke 1f204ba9c5 Fix a c++11 issue 2014-01-03 15:01:39 +01:00
Kai Nacke bdc1f44088 Merge remote-tracking branch 'origin/master' into merge-2.064
Conflicts:
	gen/runtime.cpp
	runtime/CMakeLists.txt
2013-12-08 19:29:10 +01:00
Kai Nacke a2d7c9f3ed Only define version Android if compiling for this environment.
Android is a variant of Linux. In order to simplify the version coding,
only version Android is defined (version linux and version Posix are not).
2013-12-08 15:29:10 +01:00
Kai Nacke 9c590a1b88 Merge branch 'master' into merge-2.064 2013-12-03 18:10:29 +01:00
Kai Nacke cc22116993 Add Android version identifier 2013-12-03 16:47:22 +01:00
Kai Nacke eb85713ed1 Merge branch 'master' into merge-2.064 2013-11-27 22:46:38 +01:00
Kai Nacke d7d0ebb65c Add new version identifiers if a sanitizer is specified. 2013-11-27 22:43:59 +01:00
Kai Nacke 2cdc483315 Merge remote-tracking branch 'origin/master' into merge-2.064 2013-11-05 13:41:18 +01:00
kai e6529cfd3d [experimental] Add sanitizer options to LDC.
Add some of the sanitizer passes to LDC. This is not complete (linking must be
done using clang and the right `-fsanitize=` option) and may not be useful at
all.

If it proves to be usefull then a lot of other options (e.g. blacklist) must be
added.
2013-11-05 13:03:52 +01:00
David Nadlinger cb341586e3 First merge of 2.064 beta.
This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb.

Doesn't build Phobos yet.
2013-10-29 19:21:15 +01:00
Kai Nacke 287e089927 Add info to -version if compiled with address sanitizer 2013-10-23 02:53:53 +02:00
David Nadlinger 234772767a Merge pull request #520 from klickverbot/ldmd-m32-m64
LDMD: Properly initialize Params::targetModel.
2013-10-21 05:43:59 -07:00
David Nadlinger 883fd768d3 LDMD: Properly initialize Params::targetModel. 2013-10-21 13:55:49 +02:00
David Nadlinger f8531f1b3c Add 'v' back in at beginning of global.version.
The lexer expects it to be there for handling __VERSION__.
2013-10-20 23:51:34 +02:00
David Nadlinger 28cd8b0ad2 Capitalize option decriptions. 2013-10-15 01:50:44 +02:00
David Nadlinger fd012bb002 Hide obsucre LLVM flags on versions that support it.
The idea is to hide any flags that an end user is unlikely
to need so that the -help output gets clearer. Some of the
flags are also downright confusing, as they seem similar
to unrelated D concepts. The hidden flags are still
available using -help-hidden.

Unfortunately, this is only possible on LLVM 3.3+.
2013-10-15 01:50:44 +02:00
David Nadlinger 00bb7f5c2e Merge pull request #508 from klickverbot/mcpu-mattr-help
Display -mcpu/-mattr help even with no source files given.
2013-10-13 12:17:46 -07:00
David Nadlinger 40cb10edf1 Merge pull request #509 from klickverbot/fix-disable-fp-elim
Bring back -disable-fp-elim.
2013-10-13 12:17:19 -07:00
David Nadlinger 257da5afe5 Bring back -disable-fp-elim.
It was moved to llvm/CodeGen/CommandLineFlags.h.

GitHub: Fixes #502.
2013-10-13 20:26:19 +02:00
David Nadlinger 54aa182f72 Remove Walter-ism that doesn't even work in release mode. 2013-10-13 20:16:40 +02:00
David Nadlinger c466796b93 Display -mcpu/-mattr help even with no source files given.
Unfortunately, we can't easily add a test for this in our
current test runner setup (i.e. dmd-testsuite).

GitHub: Fixes #505.
2013-10-13 20:16:08 +02:00
David Nadlinger 1242be25d0 Remove unused, empty Ir type.
The codegen parameter was changed to IRState instead of
removing it to set the stage for an eventual eradication
of the gIR global.
2013-10-13 19:44:29 +02:00
David Nadlinger a2a3e400c9 LDMD: Avoid unitialized data.
Found using Valgrind.
2013-10-09 19:50:28 +02:00
David Nadlinger 7b8a85a8df Fix prependMainExecutablePath for LLVM 3.4. 2013-10-08 17:56:10 +02:00
kai 7226f005b7 Fix Windows build with MSVC. 2013-10-07 18:10:53 +02:00
David Nadlinger e4fee1116a ARM: Use -arm-enable-ehabi(-descriptors).
D exception handling does not work at all yet, but with these
flags it does for C++/Clang, at least in simple cases.
2013-10-06 20:15:28 +02:00
David Nadlinger aba1b82539 Finally fix LLVM 3.1 compilation. 2013-10-06 19:26:58 +02:00
David Nadlinger 445b743ba5 Implement lookupTarget() with arch override for LLVM 3.1.
To be removed again once we drop 3.1 support.
2013-10-06 19:12:36 +02:00
David Nadlinger 422715fc89 Add -float-abi switch and auto-detection for ARM.
This is based on the implementation that was reverted in
fc8e0c4c20.
2013-10-06 07:39:12 +02:00
David Nadlinger 49697a8bc2 if chain -> switch. 2013-10-06 07:39:12 +02:00
David Nadlinger 1335e26c45 Log/error message prettification. 2013-10-06 07:37:03 +02:00
David Nadlinger 359f6c585a CPU detection for ARM.
This is not perfect yet, as lookupTarget wipes out any more
specific arch info (e.g. armv8) the triple might have.
2013-10-06 07:36:59 +02:00
David Nadlinger e9e4e10085 Auto-detect target attributes for -mcpu=native.
This is currently only implemented for ARM in LLVM.
2013-10-06 02:38:50 +02:00
David Nadlinger e57d0458fb getX86TargetCPU cleanup. 2013-10-06 01:48:21 +02:00
David Nadlinger d17aa2aaac Disentangle -march and -mcpu.
-mcpu=native now actually works.

GitHub: Fixes #414.
2013-10-06 01:48:12 +02:00
David Nadlinger 02abf028f8 Don't require -triple when using -march.
There is really no reason we should, and I couldn't find out
why that check was added back in 2009.

Also cleaned up the code a bit now that the LLVM 3.0 branches
are gone.
2013-10-06 01:35:20 +02:00
David Nadlinger b2b56203a9 Use llvm::Triple::isArch64Bit (LLVM 3.1+). 2013-10-06 01:33:29 +02:00
David Nadlinger 639bc0ab71 Removed a few fatal() calls in argument parsing code.
global.errors is checked immediately after return anyway.
2013-10-06 01:33:29 +02:00
David Nadlinger b94ed4092e De-ancient-C-ification, spelled out EXIT_SUCCESS. 2013-10-06 01:33:29 +02:00
David Nadlinger 7e74f65b32 Also factored out argument parsing to separate function.
The code is still messy, but we have to start somewhere...
2013-10-06 01:33:28 +02:00
David Nadlinger cc11af3473 Factored predefined version handling code out of main(). 2013-10-06 01:33:28 +02:00
David Nadlinger 71c67457c3 Cleanup: Kill backend_init/term. 2013-10-06 01:33:28 +02:00
David Nadlinger 177b892bf0 Cleanup: We don't support DMC. 2013-10-06 01:33:28 +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
David Nadlinger ca82589e25 Merge pull request #482 from klickverbot/ldmd-create-directory
LDMD: Create output directories if they do not exist.
2013-10-03 19:21:23 -07:00
David Nadlinger 7f20de16cf LDMD: Create output directories if they do not exist.
There might be other cases using the LLVM output code as well
that I haven't handled here, but the changes are sufficient to
make LDC work with rdmd on Linux.

GitHub: Fixes #480.
2013-10-02 18:09:47 +02:00
David Nadlinger c58c833be9 Trivial indentation fix. 2013-10-02 18:02:41 +02:00
David Nadlinger cf18366c46 LDMD: Ignore -quiet, it is the default.
GitHub: Fixes #472.
2013-09-21 18:31:14 +02:00
David Nadlinger 0a8e1f78b7 Do not append unique suffix to asm file when -output-s is given.
This fixes a regression introduced by commit 50f145640
(pull request #473).
2013-09-15 23:41:55 +02:00