Commit graph

420 commits

Author SHA1 Message Date
Martin Kinkelin
f1fb9d50fd Slightly revise iOS additions 2020-01-28 20:45:07 +01:00
Jacob Carlborg
b9c284537a Add predefined version identifiers for Apple platforms 2020-01-19 20:57:23 +01:00
Martin Kinkelin
7a6c536fe9 Merge remote-tracking branch 'origin/master' into merge-2090 2020-01-12 15:49:04 +01:00
Martin Kinkelin
f7a15a59c5
Support 2 leading dashes in manual CLI pre-parsing (#3275)
Fixes #3268 and related issues.
2020-01-12 13:31:22 +01:00
Martin Kinkelin
4ac7f0554b Adapt to frontend refactorings 2019-12-22 16:29:45 +01:00
Martin Kinkelin
12a386cdae New DIP1021 implies DIP1000
Fixes dmd-testsuite's fail_compilation/test1021.d.
2019-10-18 23:46:21 +02:00
Ivan Butygin
a40c6c7fd2
Make LDC custom passes available to jit, add API for jit compiler options (#2758) 2019-09-08 09:16:05 +03:00
Martin Kinkelin
72b790c536 Add lit-test wrt. application of --DRT-* options in response files 2019-08-09 04:28:25 +02:00
Martin Kinkelin
42619762e9 Windows: Read environment variables as UTF-8
And use the wide API for pure is-env-variable-set checks too, as the
first call to a narrow env API function would lead to the C runtime
preparing and maintaining both narrow and wide environments.
2019-08-08 22:38:38 +02:00
Martin Kinkelin
9626213a5e Windows: Switch console code page to UTF-8, for LDC and LDMD
For proper in/output of narrow UTF-8 strings.
2019-08-08 22:38:38 +02:00
Martin Kinkelin
9bb3bb1457 Fix manual cmdline parsing (ignore after -run) 2019-08-08 22:38:38 +02:00
Martin Kinkelin
c7766b9357 Windows: Switch to wmain entry point & convert to UTF-8 (ldc2 & ldmd
only)

This makes _d_wrun_main (cherry-picked from dlang/druntime#2701) use the
provided args directly instead of the process's real arguments (on
Windows) - if the host D compiler supports it.
E.g., this is required when passing --DRT-* options from a response file
to _d_wrun_main.

As a major change, the encoding of the Windows cmdline arguments is
switched from the current codepage to UTF-8.

Note that the MinGW-based libs currently only provide narrow CRT entry
points.
2019-08-08 22:38:37 +02:00
Martin Kinkelin
0c0d0f6365 Expand response files before parsing -lowmem
This is required for dub, which appears to always use a response file
containing all command-line arguments.
2019-08-08 22:38:37 +02:00
Martin Kinkelin
e52199469f Upgrade front-end & libs to v2.087.0-beta.1 2019-06-21 15:39:45 +02:00
Nicholas Wilson
b750ce0c27
add __traits(getTargetInfo, "dcomputeTargets") (#3090) 2019-06-14 10:49:46 +08:00
Martin Kinkelin
3e0e98607f Fix C assert calls for uClibc
Resolves #3078.
2019-05-31 11:14:13 +02:00
Martin Kinkelin
1c3cb2bade Refactoring: Replace isMusl() by triple.isMusl()
As LLVM 3.9 is the min required version now.
2019-05-31 10:49:45 +02:00
Martin Kinkelin
3817ab0595 Upgrade front-end & libs to v2.086.0-beta.1 2019-04-23 22:13:13 +02:00
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