Commit graph

17 commits

Author SHA1 Message Date
Martin Kinkelin
3b81505534
Don't silently ignore invalid external tool specifications (#3841)
To prevent bad experiences like
https://forum.dlang.org/post/tjsbfalkosmrebhjfmah@forum.dlang.org.
2021-10-06 17:12:58 +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
18406bcc06 Adopt DMD's MSVC toolchain detection
This reduces the overhead for auto-detecting and setting up an MSVC
toolchain from a very rough 1 second to about 8 milliseconds on my box.
Enabling the auto-detection by default (and so preferring MSVC over the
'internal' toolchain if there's a Visual C++ installation) is now
possible, fixing issues like #3402.

The MSVC setup now consists of the bare minimum - prepending 3
directories to the LIB env var and 1-2 directories to PATH.
2020-04-30 21:45:56 +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
39b46d7b69 Replace old-school header guards by #pragma once 2018-10-20 16:19:46 +02:00
Martin Kinkelin
0e422af0c0
Fix corrupt prefix in integrated LLD's console output (#2781) 2018-07-18 11:38:18 +02:00
kinke
aeaf35c42f
Add -linker command-line option (#2386)
To set the linker executable for MSVC targets (e.g., `lld-link`) or the
`-fuse-ld` arg for the gcc linking command-line for the other targets.
2017-10-28 01:21:24 +02:00
kinke
3b2f6bccdb Don't use -m32/-m64 for external ARM assembler (#2264)
And merge the two out-of-sync copies for adding gcc target flags. The flag
was omitted for gcc as linker already, but not for gcc as external assembler.
2017-08-12 18:17:03 +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
Martin
1c70b12e4c Slightly refactor module driver/tool
And get rid of redundant cmdline option -archiver.
2017-03-13 23:51:16 +01:00
Martin
95c1d38e2e Integrate module gen/programs into driver/tool 2017-03-13 23:31:32 +01:00
Martin
0842277572 Move MSVC environment setup to driver/tool.cpp [NFC] 2017-03-13 23:03:33 +01: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
David Nadlinger
a10ab28912 Remove CRLF line endings in driver/tool.{h, cpp}. 2014-07-08 22:00:19 +02:00
kai
cf88271ab9 Replace llvm::sys::Path with std::string.
In many cases this is straightforward. It makes the source LLVM 3.4 compatible without using #idef's.
2013-06-29 14:20:44 +02:00
David Nadlinger
243083b88c Factored out tool invocation code into separate file. 2013-02-13 00:07:48 +01:00