David Nadlinger
0777102e9d
Workaround for --help output being truncated when redirecting to file.
2012-10-07 15:08:24 +02:00
David Nadlinger
9c3bb1ecd3
LDMD: Remove DMD-only options from help output.
2012-10-07 14:58:30 +02:00
kai
3847471b0e
DMD defines Win32 and Win64 mutually exclusive. Now LDC does the same.
2012-10-06 14:30:26 +02:00
David Nadlinger
9d52cf6855
Workaround for LLVM bug 11479 in -singleobj mode.
...
This applies the same fix as in 88f08cf for multiple object file
builds.
Fixes std.socket unit test builds.
2012-10-06 13:27:54 +02:00
David Nadlinger
0c0e88dda1
Add missing LDMD option handling code.
...
Reusing the existing parsing code for DMD compatibility was a good
idea, copy-pasting the tool together in the middle of the night not
so much.
2012-10-03 19:51:04 +02:00
David Nadlinger
e37cb50999
Use -of for object name when building executable with -singleobj.
...
This is what DMD does, and arguably the expected behavior – otherwise,
there would be no way other than using -od to prevent races if two
compiler instances could ever compile the same file(s) at the same
time (e.g. for debug/release configurations).
Should we transition to assuming -singleobj by default?
2012-10-03 18:01:58 +02:00
David Nadlinger
407e534504
LDMD: Fix handling unknown switches from DFLAGS.
2012-09-29 22:45:42 +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
kai
4b0c4bf4ae
Get rid of global.params.dataLayout.
...
The string representation of the data layout is retrieved from the TargetData class (in main) and passed via global.params.dataLayout to the module. Since the gTargetData is also a global variable it makes no sense to pass this information using another global variable.
2012-09-08 20:25:42 +02:00
David Nadlinger
bf0d8afc88
Merge branch 'dmd-2.060' into master.
...
Conflicts:
dmd2/func.c
dmd2/mars.c
2012-09-07 04:15:44 +02:00
David Nadlinger
05b9b14fa9
Fixed -debuglib in LDMD.
2012-09-07 03:51:33 +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
David Nadlinger
c941640d17
Fixed '-debug' and '-version' handling in LDMD.
...
No idea how the old version once passed the test suite.
2012-09-07 03:51:32 +02:00
David Nadlinger
837ef30fec
Merged DMD 2.060 frontend.
...
Upstream Git tag v2.060 (e8fe11c20249cb9e42538be88c99b74ede4d12e3).
2012-09-07 03:51:31 +02:00
kai
9a3cdf2e10
Use .obj extension on Windows.
...
The Windows linker LINK insists on the .obj extension. The following changes are made:
- CMake uses the same extension as the C compiler
- global.obj_ext_alt (aka .obj) is recognized as objectfile extension
- global.obj_ext_alt is used on Windows
2012-09-05 19:23:34 +02:00
kai
af69672dc7
Fixed a bug regarding lifetime of C strings.
...
The string returned by c_str() is only valid as long as the object exists. Now the object 'triple' exists until the end.
2012-08-28 06:52:29 +02:00
kai
e6a07ffdfe
Several changes to optimizer related code.
...
- New functions codeGenOptLevel() and verifyModule() to remove code duplication
- Hidden option no-verify renamed to disable-verify and moved to optimizer (like opt tool)
- Removed global.params.noVerify
2012-08-16 23:26:52 +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
kai
76cf66f50b
Expose LLVM as global version symbol.
...
Required because prototypes of intrinsics changed between 3.0 and 3.1.
2012-08-03 16:44:34 +02:00
kai
8d06145ac0
Fixes ticket 457 from dsource.org.
...
-mattr=help does not printout help without source file
2012-07-29 20:46:14 +02:00
kai
10a0bdf891
More unification work.
2012-07-29 15:19:13 +02:00
kai
41bf3ea5c8
Fix warning about casting away constness by using const_cast<>.
2012-07-25 18:20:42 +02:00
kai
508dd9ff70
Simplify CMakeLists.txt.
...
This version works with LLVM 3.0 and 3.1.
2012-07-24 23:33:15 +02:00
kai
54d054b00c
Fix #142 .
2012-07-20 18:43:32 +02:00
kai
a69c90ee6a
Change error message for -mtriple argument. Should finally fix #130 .
2012-07-20 17:29:56 +02:00
kai
b71429fc2a
Differentiate between Win32 and MinGW.
...
Removes also serach for OS name windows because this is unsupported by LLVM.
2012-07-20 06:48:29 +02:00
kai
d986d08f37
Add info about registered targets (mimic LLVM tools).
2012-07-16 23:32:57 +02:00
kai
d78fee1b7f
Add version identifier for Win64.
2012-07-14 21:46:39 +02:00
alexrp
b12784aa4e
Define ARM even in Thumb mode.
2012-07-08 03:25:49 +02:00
David Nadlinger
f6d07ba0b3
Fix #135 – -o- broken with LDMD.
2012-07-06 21:55:19 +02:00
kai
9824a3a1f8
2nd attempt to compile ldmd with MSVC.
...
This reverts the previous commits and reduces MSVC odditites to a single place.
2012-06-15 12:13:27 +02:00
kai
15ed853402
Add code to compile ldmd with MSVC.
2012-06-13 18:23:07 +02:00
David Nadlinger
7652fb8015
Explicitly include <unistd.h>.
2012-06-11 00:31:54 +02:00
David Nadlinger
295798877c
Avoid NULL/0 conversion warning.
2012-06-11 00:01:15 +02:00
David Nadlinger
53018c76f8
And climits.
...
Sorry for the noise.
2012-06-10 22:52:11 +02:00
David Nadlinger
6ddf84b61e
Explicitly include cstdarg in LDMD.
...
Hopefully compiles everywhere now.
2012-06-10 22:20:13 +02:00
alexrp
22302f5f45
Correctly define D_PIC version identifier when relocation model is PIC.
2012-06-10 21:29:28 +02:00
alexrp
00926c5654
Return 0 immediately after printing -version/--version.
2012-06-09 20:43:50 +02:00
David Nadlinger
fdee1fc725
Add back support for -C, for backwards compatibility.
2012-06-07 11:17:40 +02:00
David Nadlinger
f131647709
Pass through unknown switches to LDC.
2012-06-07 11:17:39 +02:00
David Nadlinger
6ced6dae77
Fix #45 , fix #100 : LDMD rewrite for more sophisticated emulation of DMD command line behavior.
...
It ain't pretty. I know.
2012-06-07 11:17:39 +02:00
Eldar Insafutdinov
a8398d64e8
Moved configfile to the driver
2012-04-03 21:18:16 +01:00
Eldar Insafutdinov
feefad412c
Move cl_options out of LDCShared
2012-04-02 14:53:52 +01:00
Eldar Insafutdinov
71044056e4
split toobj.cpp and moved writeModule outside of LDCShared
2012-04-02 00:11:30 +01:00
Eldar Insafutdinov
0b411b873c
Separated compiler from the driver into the shared library
2012-04-01 22:06:08 +01:00