Add new command line switch -dip25

This commit is contained in:
kai 2015-04-09 23:23:48 +02:00
parent 279c7c5e10
commit eb570a8c60
2 changed files with 10 additions and 0 deletions

View file

@ -446,6 +446,10 @@ cl::opt<bool, true, FlagParser> color("color",
cl::desc("Force colored console output"),
cl::location(global.params.color));
cl::opt<bool, true> color("dip25",
cl::desc("implement http://wiki.dlang.org/DIP25 (experimental)"),
cl::location(global.params.useDIP25));
cl::opt<unsigned char, true, CoverageParser> coverageAnalysis("cov",
cl::desc("Compile-in code coverage analysis\n(use -cov=n for n% minimum required coverage)"),
cl::location(global.params.covPercent),

View file

@ -251,6 +251,7 @@ Usage:\n\
-debuglib=name set symbolic debug library to name\n\
-defaultlib=name set default library to name\n\
-deps=filename write module dependencies to filename\n\
-dip25 implement http://wiki.dlang.org/DIP25 (experimental)\n\
-fPIC generate position independent code\n\
-g add symbolic debug info\n\
-gc add symbolic debug info, pretend to be C\n\
@ -503,6 +504,7 @@ struct Params
char* debugLibName;
char* moduleDepsFile;
Color::Type color;
bool useDIP25;
bool hiddenDebugB;
bool hiddenDebugC;
@ -567,6 +569,7 @@ struct Params
debugLibName(0),
moduleDepsFile(0),
color(Color::automatic),
useDIP25(false),
hiddenDebugB(false),
hiddenDebugC(false),
hiddenDebugF(false),
@ -634,6 +637,8 @@ Params parseArgs(size_t originalArgc, char** originalArgv, const std::string &ld
// For plain "-cov", the cmdline switch must be explicitly forwarded
// and result.coverage must be set to true to that effect.
result.coverage = (p[4] != '=');
else if (strcmp(p + 1, "dip25") == 0)
result.useDIP25 = true;
else if (strcmp(p + 1, "shared") == 0
// backwards compatibility with old switch
|| strcmp(p + 1, "dylib") == 0
@ -1049,6 +1054,7 @@ void buildCommandLine(std::vector<const char*>& r, const Params& p)
if (p.moduleDepsFile) r.push_back(concat("-deps=", p.moduleDepsFile));
if (p.color == Color::on) r.push_back("-enable-color");
if (p.color == Color::off) r.push_back("-disable-color");
if (p.useDIP25) r.push_back("-dip25");
if (p.hiddenDebugB) r.push_back("-hidden-debug-b");
if (p.hiddenDebugC) r.push_back("-hidden-debug-c");
if (p.hiddenDebugF) r.push_back("-hidden-debug-f");