Add -property command line argument

This commit is contained in:
SiegeLord
2012-01-30 18:35:09 -05:00
parent efcbe8390a
commit be9c6d03e5
3 changed files with 14 additions and 0 deletions

View File

@@ -25,6 +25,12 @@ static cl::opt<bool, true> useDeprecated("d",
cl::ZeroOrMore,
cl::location(global.params.useDeprecated));
#if DMDV2
cl::opt<bool> enforcePropertySyntax("property",
cl::desc("Enforce property syntax"),
cl::ZeroOrMore);
#endif
static cl::opt<ubyte, true> useDv1(
cl::desc("Force language version:"),
cl::ZeroOrMore,

View File

@@ -19,6 +19,9 @@ namespace opts {
extern cl::list<std::string> fileList;
extern cl::list<std::string> runargs;
extern cl::opt<bool> compileOnly;
#if DMDV2
extern cl::opt<bool> enforcePropertySyntax;
#endif
extern cl::opt<bool> createStaticLib;
extern cl::opt<bool> createSharedLib;
extern cl::opt<bool> noAsm;

View File

@@ -223,6 +223,11 @@ int main(int argc, char** argv)
printf("config %s\n", path.c_str());
}
// enforcePropertySyntax handled separately because it is a char
#if DMDV2
global.params.enforcePropertySyntax = enforcePropertySyntax ? 1 : 0;
#endif
// Negated options
global.params.link = !compileOnly;
global.params.obj = !dontWriteObj;