Martin
95c1d38e2e
Integrate module gen/programs into driver/tool
2017-03-13 23:31:32 +01:00
Martin
cab165f3d8
Set up the MSVC environment in a more flexible way
...
For invoking MS tools such as link.exe and lib.exe, which require
compatible PATH, LIB, LIBPATH etc.
We previously wrapped the invokation of the tool with a batch file taking
care of setting up the environment and then calling the actual tool.
I changed this to first invoke another batch file setting up its
environment and then dumping all environment variables to a file. LDC then
parses this file and updates its own environment variables. Later spawned
child processes then inherit the updated environment, and the tools will
be located by LLVM in updated PATH.
This allows LDC to keep track of the used Visual C++ installation (and
could so set up additional runtime libs required since VS 2015, something
we would have needed some time back when we still supported VS 2013). It's
also required as a prerequisite for integrating LLD as in-process linker
on Windows.
I quickly looked into the option of setting up the environment manually,
but the MS batch files are full of quirks, mixtures of registry and
file-system lookups, checking for existence of misc. headers to filter out
bogus installations etc. With VS 2017, there's nothing in the registry at
all anymore (at least for the Build Tools); MS expose a COM interface for
querying the VS installer... But at least they still provide the batch
files.
2017-03-13 00:36:45 +01:00
Johan Engelen
c1c1fcb027
Add PGO data to the ThinLTO module summary (LLVM >= 4.0). ( #1892 )
2016-11-23 12:53:55 +01:00
Johan Engelen
de67daff63
Merge pull request #1881 from rainers/fix_llvm40_4
...
fix build against LLVM master
2016-11-13 15:14:35 +01:00
Rainer Schuetze
99d455226e
fix build against LLVM master: llvm/Bitcode/ReaderWriter.h has been split and renamed
2016-11-13 11:05:53 +01:00
Martin
13218366b4
Don't necessarily enforce file extension of .bc, .ll, .s files
...
Use the output filename (-of or inferred) directly if a single file is
emitted per compiled module.
Fixes issue #1843 .
2016-11-09 20:34:22 +01:00
Johan Engelen
bb24fb2816
Add LTO support (full and thin), with -flto=thin|full
.
...
LTO needs linker support: I am only aware of support on OS X and Linux (through the LLVMgold plugin).
Resolves #693
2016-11-09 14:30:13 +01:00
Johan Engelen
61e99e82d7
Rename "ir2obj-cache" to "cache" (source and filenames)
2016-10-12 18:58:01 +02:00
Johan Engelen
e0c78fa198
Rename -ir2obj-cache-*
cmdline flags to -cache-*
, because the cache can be used for more things than just ir2obj caching.
...
Rename "ir2obj" namespace to "cache".
2016-10-12 18:58:01 +02:00
Martin
6c03a3d725
Streamline output filenames and -singleObj behavior some more with DMD
2016-09-07 09:53:35 +02:00
Johan Engelen
c7e0486205
Add IR-to-Objectcode caching with -ir2obj-cache=<cache dir>
.
2016-06-23 19:48:59 +02:00
Johan Engelen
acdcc4a8c1
Merge branch 'master' into merge-2.069
2016-02-13 20:12:17 +01:00
Martin
241dc9135f
Fix error message formatting
2016-02-02 22:31:54 +01:00
Johan Engelen
29ce4012af
dmd2 --> ddmd. Merge (almost all of) our changes to dmd source into the new D source of dmd 2.069.2.
...
Also adds the CMake infrastructure to compile and link the D source files.
The build is partially broken:
- A few files in Phobos and druntime do not build
- MSVC build is broken because of unresolved symbols involving reals
2016-01-28 19:03:58 +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
Martin
60d676e2a1
Drop support for LLVM < 3.5
...
This allows to clean up the code a little.
2015-10-30 22:24:05 +01:00
David Nadlinger
0647f49aa5
driver: Mention size of allocas, do not repeat obvious types
...
The latter is particularly helpful for readability of code with
deeply nested templates, i.e. huge type names.
2015-09-15 18:15:49 +02:00
Kai Nacke
bb32dcd6de
Add new hidden option -no-integrated-as.
...
This is useful if the integrated assembler causes problems.
Also adds an architecture to the assembler command line in case
of compiling for MIPS.
2015-05-25 22:54:56 +02:00
Kai Nacke
90f7debeb2
Remove a wrong space in argument.
2015-05-24 19:42:59 +02:00
Kai Nacke
2331889669
MIPS: Implement ABI handling.
...
Adds a new command line option -mabi= and uses the value to compute
the ABI to use. Adds the ABI to linker and assembler invocation, too.
Allows consistent invocation of the whole tool chain.
2015-05-24 18:11:24 +02:00
kai
6ab801361a
LLVM 3.7: Debug info classes changed again.
...
The solution is to use a typedef to hide the differences in most cases.
2015-04-30 22:43:31 +02:00
Martin
fdd449c4e5
LLVM 3.7: Metadata refactoring continues
2015-04-22 12:17:42 +02:00
Kai Nacke
7a3ef8323b
LLVM 3.7: More metadata and output stream changes.
2015-04-16 07:19:28 +02:00
Kai Nacke
76a34f2e35
LLVM 3.7: More metadata changes
2015-04-09 22:14:12 +02:00
kai
f8bddb3e99
Add AssemblyAnnotationWriter.
...
Outputs debug information as comments in .ll file.
Provided by Trass3r.
2015-04-03 15:53:06 +02:00
Kai Nacke
1b7bca65b2
LLVM 3.7: Include of <llvm/Support/Path.h> is required
2015-03-25 19:05:12 +01:00
kai
6cb787aa6d
LLVM 3.7: Fix yet another DataLayoutPass reference.
2015-03-06 21:18:54 +01:00
unknown
e56ef8b86e
copy paste error fix
2015-02-16 15:27:19 -08:00
unknown
674b614807
Update of PassManager interface to match the corresponding deprecation in LLVM's trunk for 3.7
2015-02-16 15:11:42 -08:00
kai
4de1414c41
LLVM 3.7: Use new TargetMachine.getTargetIRAnalysis() analysis pass.
...
This replaces the TargetMachine.addAnalysisPasses() method.
2015-02-04 07:28:50 +01:00
kai
b8aed4538a
Another set of changes for AIX.
...
AIX uses the XCOFF format which is not supported by LLVM.
An external assembler must be used.
2014-11-16 06:11:27 +01:00
kai
bef163f559
Fix latest LLVM 3.6 changes
2014-09-19 06:49:34 +02:00
kai
1609cb4714
Enable integrated assembler on MinGW with LLVM 3.5 or later
2014-09-04 06:36:31 +02:00
kai
d6569c496e
LLVM 3.6 fix: stream constructor now takes std::error_code instead of std::string
2014-08-28 07:55:48 +02:00
kai
df0d302d5b
Fix MingW build with LLVM 3.5
...
Starting with LLVM 3.5 it is better/required to use Triple.isWindowsGNUEnvironment().
Reported by Daniel N.
2014-08-26 18:57:12 +02:00
kai
6aebfbdd0a
Fix LLVM 3.6 build
2014-08-11 12:37:54 +02:00
kai
b73e5fb5ef
Fix LLVM 3.6 build
2014-08-06 07:18:00 +02:00
Andreas Hollandt
a1b42f28ae
fix for llvm trunk
2014-07-17 00:11:09 +02:00
kai
8abfc2f35c
Merge branch 'release-0.13.0'
2014-06-27 23:38:03 +02:00
kai
57419a59b4
Fix build with LLVM 3.5
...
Method codegenModule() used a FunctionPassManager instead of a PassManager. This results in an assertion failure.
Also initialize one more pass.
2014-06-27 22:26:33 +02:00
kai
f8a53ab3dc
Merge branch 'merge-2.064' into merge-2.065
...
Conflicts:
runtime/druntime
2014-03-12 18:27:43 +01:00
kai
08b51f836a
Add code for the new DataLayoutPass in LLVM 3.5
2014-03-10 06:51:07 +01:00
kai
be1baa877a
Fix file reading modes for LLVM 3.5
2014-03-07 06:40:42 +01:00
Kai Nacke
fe39da53e3
Merge of 2.065.0-b3.
...
The new visitor class is used for IR generation. This removes some modifications from DMD source.
2014-02-10 08:47:25 +01:00
Kai Nacke
87afa717ae
Fix more files for LLVM 3.5.
2014-01-13 18:16:22 +01:00
David Nadlinger
0a8e1f78b7
Do not append unique suffix to asm file when -output-s is given.
...
This fixes a regression introduced by commit 50f145640
(pull request #473 ).
2013-09-15 23:41:55 +02:00
David Nadlinger
50f145640f
Use PathV1 for creating temporary files on pre-3.4 LLVM.
...
GitHub: Fixes #471 .
2013-09-15 17:03:39 +02:00
kai
81bf8c19a5
Fix a typo in keyowrd
2013-07-20 18:20:24 +02:00