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
Johan Engelen
bc9ead927c
Fix LLVM 6.0 compilation.
...
See https://reviews.llvm.org/D37563
2017-09-18 11:16:23 +01:00
Martin
81775818a6
LDMD: Hide -gc
switch
2017-08-03 15:27:14 +02:00
kinke
97d0d1514e
Revise LDMD ( #2226 )
2017-07-24 17:36:49 +00:00
Martin
1fb269f940
Drop support for LLVM < 3.7
2017-07-16 02:18:00 +02:00
kinke
a5139499a3
Add -mscrtlib cmdline option and support -static on Windows ( #2041 )
...
The default MS C runtime library doesn't depend on the `LINK_WITH_MSVCRT`
CMake variable anymore.
The user can freely choose among the 4 variants libcmt[d] / msvcrt[d] via
-mscrtlib or choose between static/dynamic release variant via -static.
LDC keeps on defaulting to the static release C runtime, so
`-static=false` or `-mscrtlib=msvcrt[d]` must be used explicitly in order
to link against the runtime DLLs.
2017-04-09 01:17:28 +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
9a1c4adbbc
Add hidden -ldmd option when invoking LDC via LDMD
...
Thus providing a generic way to slightly alter some command-line semantics
in DMD compatibility mode.
2017-03-08 19:47:04 +01:00
Martin
de360802b1
Fix LDMD regression when generating response file
...
It wrongly started with argv[0] (path to ldc2 binary).
2017-03-07 22:59:27 +01:00
Martin
0b03cda379
Add new switch -mv=<package.module>=<filespec>
2017-02-19 03:02:02 +01:00
Martin
f34b8abff0
Support -mcpu switch in LDMD
...
Ignore `-mcpu=baseline`, forward `-mcpu=native` to LDC and translate
`-mcpu=avx` to `-mattr=+avx`. Show LLVM's (extensive) help for `-mcpu=?`
(which is sadly actually printed 3 consecutive times).
2017-02-18 23:46:30 +01:00
Martin
8648b9305a
Add new switch -dip1000
2017-02-18 22:59:29 +01:00
Martin
b53f4cddb4
LDMD: Warn about unsupported new -mscrtlib switch
2017-02-18 22:42:52 +01:00
Martin
00efa74e30
LDMD: Warn about unsupported -multiobj switch
2017-02-12 19:41:23 +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
Martin
29d52f0362
Sync command-line options and descriptions with DMD
2016-12-20 22:08:23 +01:00
LemonBoy
62a2252028
Implement the betterC switch like DMD does.
...
Namely, don't emit the ModuleInfo.
2016-11-25 17:40:35 +01:00
Martin
44e7511e46
LDMD: Prevent object file collisions when creating static libs
...
Approximate DMD behavior by naming the temporary object files uniquely
and, if successful, removing all generated object files.
Executables and shared libs imply -singleobj => no collisions.
2016-10-15 23:54:22 +02:00
Martin
8276269ab1
Create static libs in -od directory for LDMD only
...
Let LDC treat relative output paths as relative to the current working
directory again (as it always used to until a few weeks ago). It's more
intuitive and avoids breaking build systems/scripts using LDC directly.
Only LDMD continues to prepend the -od directory to the relative output
path, for DMD compatibility.
Fixes issue #1819 .
2016-10-14 21:47:27 +02:00
David Nadlinger
216c1126d1
ldmd: Remove now-unused createOutputDir()
2016-09-10 18:50:33 +01:00
Martin
4a9a7ec4ae
LDMD: Don't create output directories, let LDC handle that
...
LDC created the output directories already before my recent changes.
2016-09-07 10:38:26 +02:00
Martin
16b2c8942f
Support parameterless '-deps' command-line option
...
In both LDC (undocumented) and LDMD. This should fix issue #1626 .
2016-08-28 02:43:48 +02:00
Martin
36edf4f200
Inline-initialize LDMD params
2016-08-27 20:49:58 +02:00
Johan Engelen
c3fe8f3fdd
Refactor the call to llvm::sys::fs::getMainExecutable
.
...
Taking the address of `main` is UB in C++. Reading LLVM's source, any function address can be used (that's what clang does too).
2016-07-28 14:00:53 +02:00
Rainer Schuetze
a2c5f15955
implement -transition=*
2016-04-20 23:03:20 +02:00
Johan Engelen
72b5ab7642
Instead of using the C++-linker, use the D compiler to link LDC2 and LDMD.
...
This removes the need for the CMake logic to figure out what linker flags to pass the C++linker to link D code (50 lines of flaky cmake script).
2016-03-25 12:31:01 +01:00
Johan Engelen
4c95b43286
Fix #1344 . Add --version
to ldmd2
.
2016-03-07 17:48:09 +01:00
Johan Engelen
21a2be19fb
Mark -property switch as deprecated. Add deprecation message for -noboundscheck.
...
The deprecation message for -property is handled by the DDMD frontend.
2016-02-10 10:30:18 +01:00
Martin
2dfa5e8569
Some more cosmetic fixes
...
Found by searching for lines > 80 chars.
2015-11-05 19:12:32 +01:00
David Nadlinger
51afced357
Also clang-tidy driver/
2015-11-02 11:30:40 +02:00
David Nadlinger
44b0f7b615
driver/gen/ir: clang-format the world
...
This uses the LLVM style, which makes sense for sharing code
with other LLVM projects. The DMD code we use will soon all
be in D anyway.
2015-11-02 00:28:01 +02:00