Commit graph

152 commits

Author SHA1 Message Date
Nicholas Wilson
1568d0cdca
Fix compilation with LLVM 14 (#3822) 2021-09-17 16:41:49 +02:00
Martin Kinkelin
c3df7bb6ef ldmd2: Translate -target to -mtriple 2021-09-07 19:13:46 +02:00
Martin Kinkelin
f64eb90b77 ldmd2: Add support for -check=on|off
Fixes runnable/test_dip1006c.d.
2021-05-31 21:03:31 +02:00
Martin Kinkelin
18607e6239 ldmd2: Add support for new -gdwarf=<version> 2021-04-10 16:50:33 +02:00
Martin Kinkelin
67696b1484 CMake: Get rid of some obsolete checks 2021-02-10 03:26:25 +01:00
Martin Kinkelin
2172c605b4 Add support for -makedeps[=<filename>]
And streamline implicit -singleobj with DMD, also enforcing it when
compiling a *single* module *and* specifying the -of name.
[-makedeps currently depends on -singleobj.]
2021-01-07 15:55:00 +01:00
Martin Kinkelin
6f5730049b Merge remote-tracking branch 'origin/master' into merge-2.094
Conflicts:
	gen/tocall.cpp
	runtime/phobos
2020-09-30 19:46:43 +02:00
Martin Kinkelin
96b9cde428 Add support for LLVM 11
One major change is the removal of llvm::CallSite, which I've replaced
by llvm::CallBase*.
2020-09-26 01:04:50 +02:00
Martin Kinkelin
4be4501227 Re-add support for -HC without value 2020-09-23 21:32:46 +02:00
Martin Kinkelin
4431f6744f Add support for -vtemplates=list-instances 2020-09-23 21:02:59 +02:00
Martin Kinkelin
47b25ca6ab Add support for -cov=ctfe
Incl. making sure `-cov=N ... -cov[=ctfe]` doesn't reset the required
percentage to 0.

Use a dummy *bool* option for a better help output (displaying `--cov`,
not `--cov=<value>`).
2020-09-23 20:57:06 +02:00
Martin Kinkelin
1f063d4ae9 Refactor response file stuff shared by ldmd and ldc
By hiding the common functionality behind args::executeAndWait().

Also make sure to properly escape quoted args in response files.
2020-08-09 01:11:46 +02:00
Martin Kinkelin
5194181b66 Windows hosts: Fix linker cmdline length limitation via response files
Fixes #3535 and an issue for ldmd2 wrt. unquoted args containing spaces
in response files for ldc2 (uncovered during manual tests). Also create
the temporary response files in the temp directory, not in the current
working dir.
2020-08-08 01:47:52 +02:00
Martin Kinkelin
834f666ce5
Raise min LLVM version to 6.0 (#3493) 2020-07-13 20:42:50 +02:00
Martin Kinkelin
e3a1096e44 Merge upstream stable (dlang/dmd@bafab33f27) 2020-07-03 22:20:29 +02:00
Martin Kinkelin
9725dcd5de Add CLI option -vtemplates 2020-06-21 05:31:40 +02:00
Martin Kinkelin
26678a1631 Support new CLI switches -verror-style and -HC, -HCd, -HCf 2020-02-27 01:54:28 +01:00
Martin Kinkelin
40c62f0715 Resync LDMD2 help output 2019-10-20 00:45:12 +02:00
Martin Kinkelin
5ad507d176 dmd-testsuite: Adapt runnable/testpic.d to unsupported -fPIE 2019-08-27 01:52:22 +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
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
ae6c181d05 Sync LDMD usage help with DMD's 2019-03-01 18:19:00 +01:00
Martin Kinkelin
5093732972 LDMD: Support -mcpu=h and -mcpu=help too 2019-03-01 18:19:00 +01:00
Martin Kinkelin
0530f08e9a Hide legacy cmdline options -dip<N> 2019-03-01 18:19:00 +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
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
6c3d8b952e Add cmdline option -extern-std=c++{98,11,14,17} 2019-03-01 18:19:00 +01:00
Martin Kinkelin
40ca840560 Add cmdline option -verrors-context (-verrors=context for LDMD) 2019-03-01 18:19:00 +01:00
Martin Kinkelin
ef6bab0389 Add cmdline option -checkaction=context 2019-03-01 18:19:00 +01:00
Martin Kinkelin
8db8780a81 Re-sync LDMD cmdline usage help with upstream 2018-12-21 23:18:30 +01:00
Martin Kinkelin
73d0c71acd LDMD: Tiny refactoring - make use of startsWith() 2018-12-21 22:49:31 +01:00
Martin Kinkelin
793cdc4937 LDMD: Support new -color=auto 2018-12-21 22:43:30 +01:00
Martin Kinkelin
2d539fa63d Add new cmdline option -checkaction=<D|C|halt> 2018-12-21 21:36:42 +01:00
Martin Kinkelin
d4e680bcdb LDMD: Add -check cmdline option 2018-12-21 21:05:30 +01:00
Martin Kinkelin
389977d084 Add new cmdline option -mixin=<filename> 2018-12-21 20:17:50 +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
e36b77adaf Fix LDMD for LLVM 7 2018-08-22 00:46:19 +02:00
Johan Engelen
0c8c0e6a18 Fix build with LLVM trunk. (#2767) 2018-07-09 20:09:44 +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
49f4200946 Implement cmdline option -i[=<pattern>] (include imports) 2018-03-30 00:02:02 +02: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
Johan Engelen
f2d9ff3424
Add DMD-style function trace profiling. (#2477) 2018-01-14 22:22:59 +01:00
Martin Kinkelin
364d91bb70
LDMD: Replace memcmp() by strncmp() (issue #2481) (#2484) 2018-01-07 23:35:13 +01:00
Martin
d82b4a65e2 Add new switches -dip1008 and -transition=<intpromote|16997> 2018-01-06 03:20:36 +01:00
Martin
cfad799f48 Merge 2.078.0 front-end and stdlibs 2018-01-06 01:39:18 +01:00
Martin
1c2a7ac231 LDMD: Support new options -gf, -mcpu=avx2 and - 2017-10-08 00:41:02 +02:00
Martin
60cead09e7 Fix druntime-test-shared
* druntime: Adapt test/shared to vanished osmodel.mak
* LDMD: Accept multiple `-fPIC`. It translates to
  `-relocation-model=pic`; that option is provided by LLVM and only
  allowed once in the command line.
  That issue is new for 2.076, as druntime's test/common.mak defaults to
  PIC now.
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