Mercurial > projects > ldc
diff gen/cl_options.cpp @ 988:2667e3a145be
- 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.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Thu, 26 Feb 2009 14:11:49 +0100 |
parents | a8cb25d478c4 |
children | d1ec9ff0e9ba |
line wrap: on
line diff
--- a/gen/cl_options.cpp Wed Feb 25 19:30:06 2009 +0100 +++ b/gen/cl_options.cpp Thu Feb 26 14:11:49 2009 +0100 @@ -230,22 +230,18 @@ cl::Prefix, cl::aliasopt(mArch)); +cl::opt<std::string> mCPU("mcpu", + cl::desc("Target a specific cpu type (-mcpu=help for details)"), + cl::value_desc("cpu-name"), + cl::init("")); -static cl::opt<OS, true> os("t", - cl::desc("Emit code for the specified OS:"), - cl::values( -#define ENUMVAL_N(Name, Desc) clEnumValN(OS##Name, #Name, Desc) -#define ENUMVAL(Name) ENUMVAL_N(Name, #Name) - ENUMVAL(Linux), - ENUMVAL(Windows), - ENUMVAL_N(MacOSX, "Mac OS X"), - ENUMVAL(FreeBSD), - ENUMVAL(Solaris), -#undef ENUMVAL -#undef ENUMVAL_N - clEnumValEnd), - cl::Prefix, - cl::location(global.params.os)); +cl::list<std::string> mAttrs("mattr", + cl::CommaSeparated, + cl::desc("Target specific attributes (-mattr=help for details)"), + cl::value_desc("a1,+a2,-a3,...")); + +cl::opt<std::string> mTargetTriple("mtriple", + cl::desc("Override target triple")); // "Hidden debug switches"