Commit graph

31 commits

Author SHA1 Message Date
Johan Engelen
91d306894e
Add support for LLVM 17. (#4533) 2023-12-03 19:07:31 +01:00
Martin Kinkelin
a053480010 Misc. merge fixes (C++) 2023-11-06 00:33:57 +01:00
Martin Kinkelin
9ce57807c0 Drop support for LLVM 9 and LLVM 10 2023-07-29 01:12:43 +02:00
Martin Kinkelin
5b137768a0 Run C preprocessor 2023-06-07 12:06:25 +02:00
Martin Kinkelin
1e00f63045 Adapt to upstream global.params.* -> target.* shuffling 2021-05-29 00:19:22 +02:00
Martin Kinkelin
29b4355f26 Merge upstream stable (dlang/dmd@d8668e1afa)
Requiring some adaptations for enhanced emitMakeDeps functionality.
2021-02-08 21:23:59 +01:00
Johan Engelen
29245c8255
Add --ftime-trace functionality. (#3624)
This uses LLVM's TimeProfiler functionality, such that LLVM's work is traced in the same profile (optimization and machine code gen).
Functionality is meant to be identical to Clang and LLD's --ftime-trace.
2020-12-28 17:05:04 +01: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
834f666ce5
Raise min LLVM version to 6.0 (#3493) 2020-07-13 20:42:50 +02:00
Martin Kinkelin
c8194626d8 Windows: Do not leak MSVC-environment-setup into -run child processes 2020-02-26 00:28:17 +01:00
Martin Kinkelin
4ac7f0554b Adapt to frontend refactorings 2019-12-22 16:29:45 +01:00
Martin Kinkelin
e52199469f Upgrade front-end & libs to v2.087.0-beta.1 2019-06-21 15:39:45 +02:00
Martin Kinkelin
0217a68dac dmd-testsuite: Adapt & extend runnable/test13774.sh 2019-03-21 20:32:10 +01:00
Temtaime
b8fe4f7e82
Add lib files when linking for a static library
LDC currently silently ignores all passed lib files when linking for a static library, but dmd doesn't.
Current proposal makes LDC match DMD's behavior and link the libraries together.
2019-03-19 15:08:57 +03: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
5c24f60cf9
Raise min LLVM version to 3.9 (#2872) 2018-10-15 22:31:59 +02:00
Martin Kinkelin
0e422af0c0
Fix corrupt prefix in integrated LLD's console output (#2781) 2018-07-18 11:38:18 +02:00
Martin Kinkelin
3c86332200 Slightly revise stripped-down llvm-ar code in driver/archiver.cpp
Cross-checked against LLVM 6.0.0.
2018-06-28 00:43:15 +02:00
Martin Kinkelin
13b045510c
Try to fix internal archiver issue for SemaphoreCI (#2695)
It seems to be hitting non-ENOENT when trying to open a non-existent
target library, although the error code's message is 'No such file or
directory'. - Prefer an exists() check instead of relying on an exact
error code.
2018-05-11 14:39:01 +02:00
Martin
fd9c1d1b72 Strip path when inferring exe/lib name from first object file
This is what DMD does and crucial for `ldmd2 -od=objects foo.d` with
relative -od path (and no -of). The object file path will be
`objects/foo.o[bj]`. As it's relative, LDC used to prepend the objects
dir (again) in LDMD mode, resulting in the inferred executable file name
`objects/objects/foo[.exe]`.

So while this is a breaking change, it fixes DMD compatibility of LDMD
and makes a lot of sense for 'pure' LDC too IMO (use the first object's
file name, replace the extension and save it in the working dir, not in
the directory containing the first object file).

This fixes the dmd-testsuite regressions with relative RESULTS_DIR and
a few long-standing non-fatal dmd-testsuite errors (failing file
removals).
2018-01-25 03:34:43 +01:00
Martin
cfad799f48 Merge 2.078.0 front-end and stdlibs 2018-01-06 01:39:18 +01:00
Martin
b4ba856c19 Revert "OSX: Use external archiver by default, require -ar= for internal one (#2368)"
This reverts commit 463874e87c.

Xcode 9.0.1 apparently ships with a fixed ranlib.
2017-10-24 01:33:35 +02:00
kinke
463874e87c OSX: Use external archiver by default, require -ar= for internal one (#2368)
Works around issue #2350.
2017-10-17 19:47:30 +02:00
Johan Engelen
8ad5212399 Fix LLVM 6.0 build. (#2342)
* LLVM 6: tool_output_file was renamed to ToolOutputFile.

http://llvm.org/viewvc/llvm-project?view=revision&revision=314050

* Update SPIRV-LLVM

* Fix new LLVM6 API for sanitizerBlacklist->inSection
2017-09-30 17:58:08 +02:00
kinke
e8bfc4d987 Adapt embedded llvm-ar to LLVM 5.0 final (#2349) 2017-09-26 20:04:39 +02:00
Johan Engelen
b584a05333 Fix LLVM 6.0 compilation. (#2305)
* Fix LLVM 6.0 compilation.

* Update the SPIRV LLVM
2017-09-05 19:58:16 +02:00
Martin
383c2d3a59 Range-ify usages of front-end Arrays 2017-06-04 00:29:44 +02:00
Martin
00d5f9b5b5 Integrate LLD for MSVC targets via experimental CMake option LDC_WITH_LLD
Results in a 7.5% bigger RelWithDebInfo ldc2.exe on Win64 with LLVM 3.9.1.

LLD is currently enforced when building with LDC_WITH_LLD=ON. And LLD
still doesn't support debuginfo (.pdb) generation for MSVC targets.
2017-05-27 21:21:31 +02:00
Martin
ec1a54aade Move static lib generation from driver/linker.cpp to driver/archiver.cpp 2017-05-26 21:55:25 +02:00
Johan Engelen
a28c76df91 Fix LLVM trunk build. 2017-05-21 22:39:55 +02:00
Martin
ad3294b3ae Enable cross-static-lib generation for LLVM 3.9+
By directly integrating LLVM's `llvm-lib.exe` driver to generate static
libs for MSVC targets and a stripped-down version of the `llvm-ar` tool
for the other targets.

Introduce command-line option `-archiver=<file>` to allow the user to
specify an external archiver to be invoked.
2017-03-12 03:56:46 +01:00