mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-10-07 00:26:55 +02:00
- Fixed LLVM style CL args for D2.
- Moved main() into its own file gen/main.cpp - Fixed basic cross compilation - removed the option for setting OS - added support for llc's mattr, mcpu and mtriple switches - added basic ABI abstraction for return value rewrites, it's not perfect and will probably be completely rewritten once I get to handling parameter rewrites as well. - x86-64 extern(C) abi for cfloat returns now match (llvm-)gcc.
This commit is contained in:
+15
-2
@@ -40,6 +40,19 @@
|
||||
#include "d-dmd-gcc.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
|
||||
static llvm::cl::opt<bool> preservePaths("op",
|
||||
llvm::cl::desc("Do not strip paths from source file"),
|
||||
llvm::cl::ZeroOrMore);
|
||||
|
||||
static llvm::cl::opt<bool> fqnNames("oq",
|
||||
llvm::cl::desc("Write object files with fully qualified names"),
|
||||
llvm::cl::ZeroOrMore);
|
||||
|
||||
|
||||
|
||||
ClassDeclaration *Module::moduleinfo;
|
||||
|
||||
Module *Module::rootModule;
|
||||
@@ -139,12 +152,12 @@ File* Module::buildFilePath(char* forcename, const char* path, const char* ext)
|
||||
argobj = forcename;
|
||||
else
|
||||
{
|
||||
if (global.params.preservePaths)
|
||||
if (preservePaths)
|
||||
argobj = (char*)this->arg;
|
||||
else
|
||||
argobj = FileName::name((char*)this->arg);
|
||||
|
||||
if (global.params.fqnNames)
|
||||
if (fqnNames)
|
||||
{
|
||||
if(md)
|
||||
argobj = FileName::replaceName(argobj, md->toChars());
|
||||
|
||||
Reference in New Issue
Block a user