diff --git a/gen/cl_options.cpp b/gen/cl_options.cpp index 806a4bd3..1388e3d2 100644 --- a/gen/cl_options.cpp +++ b/gen/cl_options.cpp @@ -25,6 +25,12 @@ static cl::opt useDeprecated("d", cl::ZeroOrMore, cl::location(global.params.useDeprecated)); +#if DMDV2 +cl::opt enforcePropertySyntax("property", + cl::desc("Enforce property syntax"), + cl::ZeroOrMore); +#endif + static cl::opt useDv1( cl::desc("Force language version:"), cl::ZeroOrMore, diff --git a/gen/cl_options.h b/gen/cl_options.h index cdfe1343..6d5dca42 100644 --- a/gen/cl_options.h +++ b/gen/cl_options.h @@ -19,6 +19,9 @@ namespace opts { extern cl::list fileList; extern cl::list runargs; extern cl::opt compileOnly; +#if DMDV2 + extern cl::opt enforcePropertySyntax; +#endif extern cl::opt createStaticLib; extern cl::opt createSharedLib; extern cl::opt noAsm; diff --git a/gen/main.cpp b/gen/main.cpp index 4ed26537..94a69d06 100644 --- a/gen/main.cpp +++ b/gen/main.cpp @@ -219,6 +219,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;