Commit graph

502 commits

Author SHA1 Message Date
Martin Kinkelin
48e1df4759 Fix crash with -lowmem -mixin 2019-03-09 15:07:00 +01:00
Martin Kinkelin
eed8cb88f5 Filter out --DRT-* options in the cmdline 2019-03-03 01:55:51 +01:00
Martin Kinkelin
8016608a55 Enable opt-in GC for front-end via explicit -lowmem switch
This is a port of dlang/dmd#9048.
2019-03-02 21:16:18 +01:00
Martin Kinkelin
6765e51799 Change behavior when invoking LDC/LDMD without source files
Only display the appropriate usage help (and then fail) if invoked
without any explicit cmdline options. Otherwise emit an error about
missing source files and fail immediately, without displaying the usage
help.

Besides making LDC and LDMD behave identically in this regard, it makes
just more sense IMO (when forgetting to specify a file, LDC previously
just printed the cmdline help without any error message).

It also makes `ldmd2 -transition=?` and `ldmd2 -preview=help` etc. print
the expected help without LDMD special cases.
2019-03-01 18:19:00 +01:00
Martin Kinkelin
12d6193b9a Print transition/preview/revert usage help without src file 2019-03-01 18:19:00 +01:00
Martin Kinkelin
b8dc871e81 Add cmdline options -preview and -revert
Reusing parsing and usage functionality from DMD, as the number of these
is likely to grow.
2019-03-01 18:19:00 +01:00
Martin Kinkelin
b972262f73 Refactoring: Let mars.d handle cmdline reconciliation 2019-03-01 18:19:00 +01:00
Martin Kinkelin
5e93ed0dfd Upgrade front-end & libs to v2.085.0-beta.1 2019-03-01 18:19:00 +01:00
Martin Kinkelin
b9ebfe0fca Add -transition={fixAliasThis,markdown,vmarkdown} 2018-12-22 00:23:42 +01:00
Martin Kinkelin
a170aa4b2c Don't let -unittest override -{enable,disable}-asserts
This conforms to a DMD breaking change too.
2018-12-21 22:16:45 +01:00
Martin Kinkelin
25dd4007e7 Don't let -release cmdline option override previous -{enable,disable}-{invariants,preconditions,postconditions,contracts}
This is a breaking change, conforming to new DMD semantics.
The previous semantics were inconsistent, as -{enable,disable}-asserts
and -boundscheck (as well as new -{enable,disable}-switch-errors)
weren't overridden.
2018-12-21 22:15:04 +01:00
Martin Kinkelin
389977d084 Add new cmdline option -mixin=<filename> 2018-12-21 20:17:50 +01:00
Martin Kinkelin
26c27c664d Don't codegen header files (.di)
A port from dmd/mars.d.
2018-12-21 19:13:08 +01:00
Martin Kinkelin
32ecbdd266 Upgrade front-end & libs to v2.084.0-beta.1 2018-12-18 02:31:57 +01:00
Martin Kinkelin
c193ad8047 Upgrade to v2.083.0 2018-11-02 02:52:13 +01:00
Martin Kinkelin
4a23399236 Aim for consistent #includes (order + dir prefix)
I surely missed a few.
2018-10-20 16:19:46 +02:00
Martin Kinkelin
61a7e407ab Add new command-line option -transition=<dtorfields|14246> 2018-10-20 16:19:46 +02:00
Martin Kinkelin
7776c4081b Upgrade frontend & libs to v2.083.0-beta.1 2018-10-20 16:19:46 +02:00
Martin Kinkelin
5c24f60cf9
Raise min LLVM version to 3.9 (#2872) 2018-10-15 22:31:59 +02:00
Bernhard M. Wiedemann
3064d35c04 Don't print actual host CPU in version info with env variable SOURCE_DATE_EPOCH (#2812) 2018-09-27 23:13:02 +02:00
Martin Kinkelin
98707f0068 Add predef. versions D_{ModuleInfo,Exceptions,TypeInfo} for non-betterC 2018-08-18 15:08:17 +02:00
Martin Kinkelin
9a15cb6d35 Replace predefined versions WebAssembly{32,64} by general WebAssembly (#2779)
As that (+ D_LP64 for wasm64) is what DMD does, according to Petar
(https://github.com/ldc-developers/ldc/issues/2144#issuecomment-335181401).

See https://dlang.org/spec/version.html
2018-07-17 10:44:48 +02:00
Martin Kinkelin
631e29b761 Clang-format driver/main.cpp 2018-07-09 20:23:27 +02:00
Martin Kinkelin
22ec248c35 Add predefined version WebAssembly{32,64} for WebAssembly targets 2018-07-09 20:23:27 +02:00
Johan Engelen
958a1b5b2e Define D_AVX and D_AVX2 if the target support them. (#2711) 2018-05-25 18:38:57 +02:00
Martin Kinkelin
0cd14bf80e
Predefine version D_HardFloat instead of D_SoftFloat for -float-abi=softfp (#2678)
Matching the D_HardFloat semantics: 'the target hardware has a floating
point unit'.
2018-05-11 14:39:12 +02:00
Diederik de Groot
14fa5b9a3a Set global.params.isDragonFlyBSD = triple->isOSDragonFly() (#2690) 2018-05-10 01:44:49 +02:00
Martin
6812e0bcd4 Merge branch 'master' into merge-2.079
Conflicts:
	driver/cl_options.h
	driver/configfile.h
	ldc2.conf.in
	ldc2_phobos.conf.in
2018-04-22 14:31:31 +02:00
Martin
82a6ccd293 Refactor default libs linker stuff to driver/linker.cpp 2018-04-21 18:23:59 +02:00
Martin
891234bbe4 Only set rpath when linking against shared default libs 2018-04-21 18:23:59 +02:00
Martin
025c69cc65 Merge branch 'master' into merge-2.079
Conflicts:
	appveyor.yml
	driver/main.cpp
	runtime/druntime
	runtime/phobos
2018-04-15 18:46:39 +02:00
Martin
5ac6c85655 Predefine version D_ObjectiveC _before_ printing predefs with -v
This fixes 64bit-macOS-exclusive runnable/test18335.sh.
2018-04-13 21:13:38 +02:00
Martin
eef57c8c10 Print _categorized_ help if there are no files in the cmdline 2018-04-12 00:12:59 +02:00
Martin
819073d90d Enforce static default libs with cmdline option -static 2018-04-12 00:12:58 +02:00
Martin
3ff47b87cd Support special case of -Xi=... requiring no source file
This fixes dmd-testsuite's compilable/{test18367,json_nosource}.sh.
2018-03-31 02:11:36 +02:00
Martin
32b7637528 Include config file path in JSON output
Required for dmd-testsuite's compilable/json2.d.

Also fixes a bug regarding ConfigFile::path() with a null config file
path (e.g., when disabled explicitly via `-conf=`) - the
std::string(const char *) ctor segfaults for a null pointer arg,
whereas llvm::StringRef handles null pointers gracefully.
2018-03-30 23:56:42 +02:00
Martin
3d0f5c28ac Implement (undocumented) cmdline option -Xi=<JSON field name> 2018-03-30 00:54:15 +02:00
Martin
b144fe1123 Merge branch 'master' into merge-2.079
Conflicts:
	runtime/druntime
	runtime/phobos
2018-03-30 00:06:01 +02:00
Martin
49f4200946 Implement cmdline option -i[=<pattern>] (include imports) 2018-03-30 00:02:02 +02:00
Radu Racariu
eebd2d4519 add MIPS32 predefined identifier 2018-03-26 17:59:59 +01:00
Radu Racariu
42ef1dd676 fixup abi for uclibc (#2606) 2018-03-24 16:19:23 +01:00
joakim-noah
04cd029bb9 Pull in Musl's assert function for betterC mode. (#2604) 2018-03-04 20:48:07 +01:00
Martin
5608825f6f Merge branch 'master' into merge-2.079 2018-02-25 18:37:22 +01:00
Radu Racariu
af4ff423a1 Add the CRuntime_UClibc version identifier (#2597)
Enable the `uclibc` in triple, example usage  `arm-linux-uclibc`
2018-02-25 18:35:15 +01:00
Martin
df4f854dd5 Upgrade to D v2.079.0-beta.1 2018-02-20 02:04:41 +01:00
Johan Engelen
16ecb3e79f
Add LLVM-pass plugin support to LDC. Commandline flag: -plugin=.... (#2554)
This adds functionality to load plugins such as the AFL llvm-mode plugin: https://github.com/mirrorer/afl/blob/master/llvm_mode/afl-llvm-pass.so.cc
Note that such plugins developed for Clang should also work for LDC !
2018-02-13 20:22:48 +01:00
David Nadlinger
68d3c64318
Merge pull request #2373 from kinke/musl
Add predefined version CRuntime_Musl
2018-01-31 00:05:47 +00:00
Martin
1b860e70d7 Merge branch 'master' into merge-2.078 2018-01-26 18:52:49 +01:00
Johan Engelen
8e0e688f5b
Explicitly pass triple to option initialization routine. [NFC] (#2533)
This removes the dependency on the global parameter / makes the dependency much more explicit.
2018-01-22 21:45:51 +01:00
Martin
197e65efde Merge branch 'master' into merge-2.078
Conflicts:
	driver/main.cpp
	gen/cl_helpers.h
	gen/declarations.cpp
	runtime/druntime
	tests/d2/dmd-testsuite
2018-01-20 11:20:17 +01:00