Commit graph

36 commits

Author SHA1 Message Date
kai
f8a53ab3dc Merge branch 'merge-2.064' into merge-2.065
Conflicts:
	runtime/druntime
2014-03-12 18:27:43 +01:00
kai
2f2fa92df3 Fix includes for LLVM 3.5 2014-03-07 06:40:39 +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
a831d4e11c Fix LLVM 3.4/3.5 build 2014-01-12 13:51:12 +01:00
Alexey Prokhin
6ef20b6123 Fixed incorrect static library path 2014-01-12 15:44:17 +04:00
kai
e6529cfd3d [experimental] Add sanitizer options to LDC.
Add some of the sanitizer passes to LDC. This is not complete (linking must be
done using clang and the right `-fsanitize=` option) and may not be useful at
all.

If it proves to be usefull then a lot of other options (e.g. blacklist) must be
added.
2013-11-05 13:03:52 +01: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
kai
f1c71e4bac Make ldc compatible with LLVM 3.4
Development of LLVM 3.4 started with a cleanup of the path class (PathV1).
The changes here let ldc compile at least with rev. 184039 of LLVM.
2013-06-15 19:52:29 +02:00
David Nadlinger
2617db0395 Merge pull request #346 from klickverbot/m32m64
Only specify -m32/-m64 for archs where the variants exist.
2013-05-31 12:10:49 -07:00
kai
4343965106 Use /LARGEADDRESSAWARE:NO only for debug builds with LLVM 3.4.
Most of the LLVM bugs regarding relocations are fixed now.
2013-05-24 16:07:25 +02:00
David Nadlinger
23d82b9620 Only specify -m32/-m64 for archs where the variants exist. 2013-05-11 21:49:19 +02:00
kai
308919f371 Revert "Linker flag /LARGEADDRESSAWARE is not required with LLVM 3.3.".
There is still an issue left in LLVM. I need to investigate this further.
2013-04-20 14:07:30 +02:00
kai
d8aed3627e Linker flag /LARGEADDRESSAWARE is not required with LLVM 3.3.
With a recent commit support for the missing relocations was added.
This change removes the flag from the linker command line.
2013-04-15 07:08:46 +02:00
David Nadlinger
92899dff96 Link in ws2_32 by default on MinGW. 2013-02-14 18:14:49 +01:00
David Nadlinger
f417500abc MinGW compilation fixes. 2013-02-13 00:07:53 +01:00
David Nadlinger
e7bbacadb7 Removed useless -quiet switch. 2013-02-13 00:07:49 +01:00
David Nadlinger
243083b88c Factored out tool invocation code into separate file. 2013-02-13 00:07:48 +01:00
David Nadlinger
0a96aea868 Sort includes according to style guidelines:
1. Main include corresponding to .cpp file, if any.
 2. DMD and LDC includes.
 3. LLVM includes.
 4. System includes.

Also updated a few include guards to match the default format.
2013-02-07 21:20:55 +01:00
David Nadlinger
6de735de31 Small cleanup. 2013-02-07 21:20:54 +01:00
David Nadlinger
d4b391249d Removed redundant global.params.os field.
I hope I have untangled the checks for "native" Windows (Triple::Win32)
vs. Windows/MinGW/Cygwin (Triple::isOSWindows) correctly.

MinGW needs some default libraries as well, has to be fixed later.
2013-02-07 21:20:54 +01:00
David Nadlinger
4e02f41f31 Factored out output name determination logic. 2013-02-07 17:36:55 +01:00
David Nadlinger
59a4a02e49 Cleanup: Avoid signed/unsigned comparisons.
The ones ones left are for DMD-defined constants.
2012-12-20 01:21:09 +01:00
David Nadlinger
9458911839 Added LLVM-style license headers to all our files. 2012-12-16 17:19:14 +01:00
kai
e239bd6e87 Windows: Add /DEBUG to linker command line if debug symbols are requested. 2012-11-27 06:32:52 +01:00
David Nadlinger
30aba033c8 Don't push -L-l/-L-L using -Xlinker. 2012-11-15 23:02:06 +01:00
David Nadlinger
441419a60f Fix unhandled switch case warning. 2012-11-06 22:53:43 +01:00
kai
8519f448f8 Improve error message if gcc or other tools can not be found.
This fixes #192.
2012-10-14 12:39:35 +02:00
kai
940d6e907f Take advantage of Triple and TargetData.
A lot of system specific knowledge is already present in LLVM. This is used to populate several fields in global.params instead of hard coded values in main(). Ensures that the frontend and LLVM have always the same values.
2012-09-16 19:50:21 +02:00
kai
c6b3f0a4e1 Add support for MS Link.
If the target OS is Windows using the MS runtime then use LINK.EXE as the linker.
2012-09-16 13:49:47 +02:00
kai
9bc844b6dd Refactor code to create directory into new function. 2012-09-16 12:00:14 +02:00
kai
1773f7c7d9 Refactor common code to execute a program.
The common code for linking, creating libraries and running the created program is moved into a new function `ExecuteToolAndWait`.
2012-09-16 10:54:28 +02:00
kai
6e554c6647 Add support for MS Lib.
If the target OS is Windows using the MS runtime then use LIB.EXE as the archiver.
2012-09-16 00:03:27 +02:00
David Nadlinger
6b1b84a28d Pass library file arguments to linker _before_ custom switches.
This allows specifying a static D library specified at the LDC
command line to pick up symbols from druntime/Phobos.

Fixes DMD testcase 'test39'.
2012-09-07 03:51:32 +02:00
David Nadlinger
4b23e794ca Removed linkExecutable() (dead code). 2012-09-07 03:51:32 +02:00
kai
c01cae1c2b Prefer C++-style casts.
This is based on Item 2 of "More Effective C++". In general, the C++ cast operators are more expressive and easy to find,
e.g. by grep. Using const_cast also shuts up some compiler warnings.
2012-08-03 22:46:14 +02:00
Eldar Insafutdinov
feefad412c Move cl_options out of LDCShared 2012-04-02 14:53:52 +01:00
Renamed from gen/linker.cpp (Browse further)