Commit graph

340 commits

Author SHA1 Message Date
Ivan
ae4db7d3b3 Merge remote-tracking branch 'origin/master' into runtime_compile_v5 2017-11-01 22:24:27 +03:00
kinke
c1f921e583
Merge pull request #2365 from kinke/betterC
-betterC
2017-10-31 16:58:45 +01:00
kinke
d53bf3e04d
Merge pull request #2362 from ldc-developers/merge-2.076
Merge 2.076.1 front-end and stdlibs
2017-10-30 20:50:51 +01:00
Johan Engelen
fa3a78174f Add "D_betterC" version. (#2385)
Cherry-pick from upstream DMD, https://github.com/dlang/dmd/pull/7132
2017-10-26 21:46:42 +02:00
Martin
fbbbeecaca Ignore -defaultlib/-debuglib for -betterC
Analogous to DMD.
2017-10-25 00:38:05 +02:00
Ivan
afae2f296b remove isRuntimeCompileEnabled() function 2017-10-15 23:24:36 +03:00
Ivan
dc78564bf4 Merge remote-tracking branch 'origin/master' into runtime_compile_v5 2017-10-14 12:28:32 +03:00
Martin
1c2a7ac231 LDMD: Support new options -gf, -mcpu=avx2 and - 2017-10-08 00:41:02 +02:00
Martin
f8158c9ef8 LDC command line: Support - as stdin input 2017-10-08 00:41:02 +02:00
Martin
d7f68dbeb3 Merge branch 'master' into merge-2.075
Conflicts:
	runtime/druntime
2017-10-01 18:28:44 +02:00
Ivan
808f36b2d2 Merge remote-tracking branch 'origin/master' into runtime_compile_v5 2017-10-01 17:02:50 +03:00
Martin
4515474bc5 Fix Objective-C initialization regression 2017-09-27 21:37:18 +02:00
kinke
ae9d43c167 Use LLVM headers for shared codegen command-line options (#2148)
I.e., llvm/CodeGen/CommandFlags.h which in turn includes
llvm/MC/MCTargetOptionsCommandFlags.h.

This gets rid of a few duplicates on our side and includes about 35
(depending on LLVM version) new command-line options. LLVM provides a
helper function to set up the TargetOptions according to (most of) these
options.
Newer LLVM versions may add new options and we'll automatically inherit
them, including setting up the TargetOptions accordingly.

I did my best (TM) to remove a few unused/undesirable options and hide all
remaining new ones except for `-fp-contract`. The lists will need to be
tweaked from time to time.
2017-09-20 01:04:43 +02:00
Martin
41aae46b91 Merge branch 'master' into merge-2.075
Conflicts:
	runtime/druntime
2017-09-12 19:44:53 +02:00
Ivan
ccc87bdb9d opts::isRuntimeCompileEnabled() helper function 2017-09-06 21:20:49 +03:00
Ivan
a9f6875494 Do not use exteranl storage for enableRuntimeCompile flag 2017-09-05 21:23:39 +03:00
Ivan
81532cdcc9 Merge remote-tracking branch 'origin/master' into runtime_compile_v5 2017-09-03 15:29:35 +03:00
Ivan
482b822d73 Export LDC_RuntimeCompilation version when runtime compilation is enabled 2017-08-27 17:42:57 +03:00
Martin
923e30ec50 Merge branch 'master' into merge-2.075 2017-08-21 01:23:18 +02:00
Martin
d63efba2e7 Add post-switches to config file sections
For switches to be appended after the user switches (or right before the
first `-run` switch).

The sections inherit it (as well as `switches`) from the `default` section
if it isn't overridden explicitly.

Fixes issue #2186.
2017-08-20 14:25:05 +02:00
Martin
5111bbd4d2 Slightly refactor ConfigFile interface 2017-08-20 14:10:47 +02:00
Nicholas Wilson
f27109c8e8 New spirv and 6.0 compilation fixes (#2276)
Update to a new SPIRV-LLVM and fix compilation issues for LLVM6.0
2017-08-18 15:23:56 +08:00
Johan Engelen
307606384c LLVM reverted the change that required these version specific changes. (#2265)
https://llvm.org/viewvc/llvm-project?view=revision&revision=309286
2017-08-14 21:39:04 +02:00
Martin
2616261fd2 Revise all LDC-specific errors/warnings/deprecs and insert backticks
For DMD's new syntax highlighting. I grepped in all .{h,cpp} files only.
2017-08-03 22:53:49 +02:00
Martin
c51c2c0d55 Merge 2.075.0 front-end and stdlibs 2017-07-30 03:03:28 +02:00
Nicholas Wilson
a95d83e05f Conditionally set version LDC_DCompute (#2236) 2017-07-24 18:34:53 +08:00
Martin
1fb269f940 Drop support for LLVM < 3.7 2017-07-16 02:18:00 +02:00
Luís Marques
7c9874a209 Add support for MSP430 / 16-bit targets (#2194)
Relevant version identifiers PRs:
https://github.com/dlang/dmd/pull/6994
https://github.com/dlang/dlang.org/pull/1822
2017-07-14 16:55:09 +02:00
Nicholas Wilson
c041205fe0 Dcompute fixes (#2195)
* Disable debug info for now Until I get it working.

* Don't recurse into uninstansiated templates

* Remove device only modules from objfiles.

* Remove typeid generation for dcompute.

* Dont generate typeinfo member functions

* Whitelist `__dcompute_reflect`
2017-07-13 11:28:09 +08:00
Johan Engelen
fdd66e5ea7 Fix LLVM 5.0 build (#2173)
* Fix LLVM 5.0 compilation.

* Fix adding linker option metadata to LLVM module.

See https://reviews.llvm.org/D31349

* Version the SPIRV cache dir on travis.
2017-07-02 11:35:40 +02:00
Johan Engelen
22b1accb59 Replace -sanitize with -fsanitize and add -fsanitize-coverage. (#2149)
This reworks the sanitizer interface to be identical with Clang's.
What's left to do is pass the correct runtime libraries to the linker.
2017-06-15 17:19:21 +02:00
kinke
b82d87d6ee Fix potential segfault when formatting error msg (#2160) 2017-06-10 14:53:50 +02:00
kinke
d229a273e5 Print -mcpu=help / -mattr=help output only once (#2152)
When creating LLVM's TargetMachine, llvm::SubtargetFeatures::getFeatureBits()
is called 3 times, and the help is printed 3 times (or even 6 times when
specifying both `-mcpu=help -mattr=help`).

So use some new code making sure the help is printed only once and return
0 early without trying to compile anything (and so erroring if no source
files have been specified etc.).

Fixes issue #2073.
2017-06-05 01:19:00 +02:00
Martin
383c2d3a59 Range-ify usages of front-end Arrays 2017-06-04 00:29:44 +02:00
Nicholas Wilson
ae6ff33fc1 [dcomptue] codegen (#2126)
* code generation

* simplify logic

* apply clang-format

* Undo completely inane choice by clang-format

* Guard the use of the command line args.
2017-05-24 08:55:32 +08:00
Martin
d01a91f755 Allow multiple occurrences for almost all command-line flags
Except for `-sanitize` and `-cache-prune*`.
2017-05-23 20:53:57 +02:00
Martin
6c6379d534 Fix mistake in object file type autodetection 2017-05-22 22:40:22 +02:00
David Nadlinger
df20e65b1d Merge pull request #2118 from kinke/gh2105
Fix object file type autodetection (issue #2105)
2017-05-20 21:22:48 +01:00
Martin
5becfcf4f1 Fix object file type autodetection (issue #2105) 2017-05-14 14:26:55 +02:00
Johan Engelen
3fd99eb207 Add -fsave-optimization-record option.
Resolves issue #2089
2017-05-04 11:07:16 +02:00
Martin
97188a1a27 Merge branch 'master' into merge-2.073
Conflicts:
	tests/d2/dmd-testsuite
2017-03-09 01:11:03 +01:00
Martin
1c175b76de Darwin: Change default shared-lib extension from .so to .dylib 2017-03-08 19:47:04 +01:00
Martin
162c264450 Merge branch 'master' into merge-2.073
Conflicts:
	runtime/phobos
2017-03-04 23:30:04 +01:00
e-y-e
0d9ab693bf Detect RISC-V architectures and define the correct versions 2017-03-02 20:34:55 +00:00
Martin
1d4c6fa72c Don't pre-define versions D_SIMD and D_AVX
LDC doesn't support DMD's core.simd interface.
2017-02-19 02:37:47 +01:00
Martin
3940f6f1c3 Use upstream's new printPredefinedVersions()
Resolves issue #1962.
2017-02-19 01:40:42 +01:00
Martin
627b35d680 Add DMD-compatible pre-defined versions D_SIMD and D_AVX 2017-02-19 01:24:43 +01:00
Martin
8648b9305a Add new switch -dip1000 2017-02-18 22:59:29 +01:00
Martin
cecb040ff0 Add command-line option -transition=safe
Also fix `ldmd2 -transition=?` regression and don't display an error
message when invoking LDMD without command-line args.
2017-02-12 18:47:53 +01:00
Martin
84e74e3932 Rework LDMD command-line translation and add -verrors-spec
Simplify LDMD quite a bit by translating the few different command-line
options directly in-place. This puts some more stress onto LDC's
command-line parsing, especially due to multiple occurrences of a single
Boolean option (e.g., '-o-') or mixtures of `-m64` and `-m32` etc. for
dmd-testsuite.

Also add new command-line option `-verrors-spec` showing gagged errors
(DMD's equivalent is `-verrors=<spec|limit>`) and sync the usage text with
DMD. LDMD now also recognizes `-h` (and `/?` on Windows).
2017-02-06 01:17:09 +01:00