Commit graph

139 commits

Author SHA1 Message Date
David Nadlinger
257da5afe5 Bring back -disable-fp-elim.
It was moved to llvm/CodeGen/CommandLineFlags.h.

GitHub: Fixes #502.
2013-10-13 20:26:19 +02:00
David Nadlinger
54aa182f72 Remove Walter-ism that doesn't even work in release mode. 2013-10-13 20:16:40 +02:00
David Nadlinger
c466796b93 Display -mcpu/-mattr help even with no source files given.
Unfortunately, we can't easily add a test for this in our
current test runner setup (i.e. dmd-testsuite).

GitHub: Fixes #505.
2013-10-13 20:16:08 +02:00
David Nadlinger
1242be25d0 Remove unused, empty Ir type.
The codegen parameter was changed to IRState instead of
removing it to set the stage for an eventual eradication
of the gIR global.
2013-10-13 19:44:29 +02:00
kai
7226f005b7 Fix Windows build with MSVC. 2013-10-07 18:10:53 +02:00
David Nadlinger
422715fc89 Add -float-abi switch and auto-detection for ARM.
This is based on the implementation that was reverted in
fc8e0c4c20.
2013-10-06 07:39:12 +02:00
David Nadlinger
b2b56203a9 Use llvm::Triple::isArch64Bit (LLVM 3.1+). 2013-10-06 01:33:29 +02:00
David Nadlinger
639bc0ab71 Removed a few fatal() calls in argument parsing code.
global.errors is checked immediately after return anyway.
2013-10-06 01:33:29 +02:00
David Nadlinger
b94ed4092e De-ancient-C-ification, spelled out EXIT_SUCCESS. 2013-10-06 01:33:29 +02:00
David Nadlinger
7e74f65b32 Also factored out argument parsing to separate function.
The code is still messy, but we have to start somewhere...
2013-10-06 01:33:28 +02:00
David Nadlinger
cc11af3473 Factored predefined version handling code out of main(). 2013-10-06 01:33:28 +02:00
David Nadlinger
71c67457c3 Cleanup: Kill backend_init/term. 2013-10-06 01:33:28 +02:00
David Nadlinger
177b892bf0 Cleanup: We don't support DMC. 2013-10-06 01:33:28 +02:00
David Nadlinger
68c272d6d9 Renamed driver/target to .../targetmachine to avoid confusion with the frontend file. 2013-10-06 01:33:28 +02:00
kai
fc24bd15ca Add version identifier for AArch64 2013-09-07 18:17:02 +02:00
Alexey Prokhin
54078eca66 Set global.params.isOS variables so we do not have to modify dmd frontend to use targetTriple 2013-07-29 18:49:09 +04:00
Alexey Prokhin
69e7907875 Move implementation of Module::buildTargetFiles and Module::buildFilePath to gem/module.cpp 2013-07-28 21:17:25 +04:00
kai
aa143b560c Include Git revision in version info.
CMakeLists.txt contains now the version numbers for DMD and (next) LDC release.
If a .git folder is found then the LDC version is replaced by the first 6 chars
of the Git revision.

Possible improvements:

- If the build is not done at the master branch then it could be useful to check for a tag and use the tag instead of the revision. (for release builds)
- Maybe it is useful to include the branch name.

This fixes issue #366.
2013-06-21 06:47:32 +02:00
David Nadlinger
235bb94878 Make -release only disable bounds checking in non-@safe code. 2013-06-17 13:31:21 +02:00
David Nadlinger
68798f06c8 Accept '.dd' pure DDoc files. 2013-06-16 00:39:47 +02:00
David Nadlinger
46b6fdd531 Implement '-main'. 2013-06-15 23:09:59 +02:00
David Nadlinger
fd3c696d94 Call Expression::init() during startup.
Was added in 2.063.
2013-06-12 20:16:37 +02:00
David Nadlinger
292caa1438 Merge the 2.063 frontend. 2013-06-12 20:16:37 +02:00
David Nadlinger
c02b38fe9a Removed LLVM 3.0 compatibility code.
There might be still some pieces left here and there, and
there is certainly code that could be rewritten in a nicer
way with the 3.0 requirement out of the picture.
2013-05-31 20:48:38 +02:00
Hans W. Uhlig
4f6204f191 Adding Space to Literal 2013-05-28 17:38:09 -07:00
David Nadlinger
edbace8ae8 Default to PIC on OS X.
driver/target.h is due for a refactoring after the next
release is branched off.
2013-05-19 21:19:37 +02:00
David Nadlinger
fc8e0c4c20 Revert -float-abi implementation.
The new command line option conflicted with a builtin LLVM 3.0
one. The functionality will be added back in after the 0.11.0
release branch has been created.

This reverts commit 6a1bc70bd7 and
subsequent fixes.
2013-05-12 00:18:44 +02:00
David Nadlinger
6a1bc70bd7 Added -float-abi and auto-detection logic for ARM.
Even though this argument design conflates two separate concepts
(ABI and hardware/software implementation), I chose to go
with it since users are liekly know it from GCC and the
combination of softloat operations with hardfloat ABI makes
no sense.

I didn't implement it for old LLVM versions, as ARM EABI
exception handling requires LLVM 3.3+ anyway, without which
LDC would be useless anyway.
2013-05-11 21:07:54 +02:00
David Nadlinger
30bf4e121f Do not optimize for host CPU by default.
GitHub: Fixes #323.
2013-05-09 22:15:19 +02:00
David Nadlinger
56e35e31a0 Factored out target creation logic to separate functions.
Care was taken to avoid dependencies on the host of
command line globals.

std::string should probably replaced by llvm::StringRef
in some places.
2013-05-09 17:27:35 +02:00
kai
41bbc8fbf5 Rewrite the llvm::Linker fix for LLVM 3.3.
The previous commit changed the behaviour a bit. This solution should have an identical result.
2013-05-05 20:27:12 +02:00
kai
ebaa3f08b3 Fix LLVM 3.3 build error.
llvm/Linker.h was changed. This commit reflects the new logic.
2013-05-05 18:42:14 +02:00
David Nadlinger
b8cdfad8c0 global.params.useAvailableExternally -> global.inExtraInliningSemantic.
This will hopefully make the associated code a bit easier
to read.
2013-04-01 21:17:13 +02:00
David Nadlinger
862ece3ca4 Fix -lib with fully specified output name and '-c'.
The whole output path handling code is in dire need of a
cleanup/rework.
2013-03-18 13:33:55 +01:00
David Nadlinger
153caa9bf7 Print nice error message for wrong '-run' argument.
This fixes DMD test case 'diag6743'.
2013-03-16 14:02:01 +01:00
David Nadlinger
58908e044a Removed DMD code remnants from driver/main.cpp. 2013-03-16 13:37:07 +01:00
kai
d04864103e Use the new Port::stricmp() method. 2013-03-08 06:53:12 +01:00
kai
bf52dbe389 Merge of DMD 2.062. 2013-03-06 18:18:56 +01:00
kai
aa4fe6a748 Remove DMDV1 and DMDV2. 2013-03-06 18:18:00 +01:00
David Nadlinger
e7bbacadb7 Removed useless -quiet switch. 2013-02-13 00:07:49 +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
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
5f3ba41574 Removed redundant global.params.cpu field.
Now that we have global.params.targetTriple, the information
is only duplicated.
2013-02-07 17:36:54 +01:00
David Nadlinger
bee0b9eba1 Remove global.params.isLE. 2013-02-07 14:37:21 +01:00
kai
6ddb524b91 More LLVM 3.3 changes 2013-01-11 22:46:36 +01:00
kai
a11459bc31 "The Great Renaming" continues.
More changes to match the renamed files of LLVM 3.3.
2013-01-06 17:17:30 +01:00
David Nadlinger
2f8705f4d6 Don't pass file name to executable on '-run'. 2013-01-04 01:42:01 +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
fca550e534 Cleanup: Remove warning overrides and fix two more warnings. 2012-12-20 01:00:57 +01:00
David Nadlinger
b713afe9c4 Cleaned up version output.
I removed the copyright notice. I don't think we are obliged to
display it for DMD; on the other hand, if we do, we might also
have to display the libconfig one (LGPL). Thus, this seemed like
the better choice.

The indentation is to align with the registered target output,
which we cannot control.
2012-12-16 18:08:19 +01:00