Remove DMDV1 and DMDV2.

This commit is contained in:
kai
2013-03-05 18:37:09 +01:00
parent 32af000854
commit aa4fe6a748
40 changed files with 8 additions and 981 deletions

View File

@@ -31,12 +31,6 @@ cl::list<std::string> runargs("run",
cl::Positional,
cl::PositionalEatsArgs);
#if DMDV1
static cl::opt<bool, true> useDeprecated("d",
cl::desc("Allow deprecated language features"),
cl::ZeroOrMore,
cl::location(global.params.useDeprecated));
#else
static cl::opt<ubyte, true> useDeprecated(
cl::desc("Allow deprecated code/language features:"),
cl::ZeroOrMore,
@@ -47,14 +41,11 @@ static cl::opt<ubyte, true> useDeprecated(
clEnumValEnd),
cl::location(global.params.useDeprecated),
cl::init(2));
#endif
#if DMDV2
cl::opt<bool, true> enforcePropertySyntax("property",
cl::desc("Enforce property syntax"),
cl::ZeroOrMore,
cl::location(global.params.enforcePropertySyntax));
#endif
static cl::opt<ubyte, true> useDv1(
cl::desc("Force language version:"),

View File

@@ -31,9 +31,7 @@ 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, true> enforcePropertySyntax;
#endif
extern cl::opt<bool> createStaticLib;
extern cl::opt<bool> createSharedLib;
extern cl::opt<bool> noAsm;

View File

@@ -185,9 +185,7 @@ Usage:\n\
#if 0
" -map generate linker .map file\n"
#endif
#if DMDV2
" -noboundscheck turns off array bounds checking for all functions\n"
#endif
" -nofloat do not emit reference to floating point\n\
-O optimize\n\
-o- do not write object file\n\
@@ -450,18 +448,12 @@ Params parseArgs(size_t originalArgc, char** originalArgv, ls::Path ldcPath)
result.verbose = true;
else if (strcmp(p + 1, "vdmd") == 0)
result.vdmd = true;
#if DMDV2
else if (strcmp(p + 1, "vtls") == 0)
result.logTlsUse = true;
#endif
else if (strcmp(p + 1, "v1") == 0)
{
#if DMDV1
// Just ignore, for backwards compatibility.
#else
error("use DMD 1.0 series compilers for -v1 switch");
break;
#endif
}
else if (strcmp(p + 1, "w") == 0)
result.warnings = Warnings::asErrors;
@@ -582,10 +574,8 @@ Params parseArgs(size_t originalArgc, char** originalArgv, ls::Path ldcPath)
result.quiet = 1;
else if (strcmp(p + 1, "release") == 0)
result.release = 1;
#if DMDV2
else if (strcmp(p + 1, "noboundscheck") == 0)
result.noBoundsChecks = 1;
#endif
else if (strcmp(p + 1, "unittest") == 0)
result.emitUnitTests = 1;
else if (p[1] == 'I')
@@ -752,12 +742,10 @@ void buildCommandLine(std::vector<const char*>& r, const Params& p)
if (p.emitSharedLib) r.push_back("-shared");
if (p.pic) r.push_back("-relocation-model=pic");
if (p.emitMap) warning("Map file generation not yet supported by LDC.");
#ifndef DMDV1
// LDMD historically did not enable singleobj mode, so in order not to
// break build systems as a D1 parting gift, don't change this right now.
// This might change based on user feedback, though.
if (!p.multiObj) r.push_back("-singleobj");
#endif
if (p.debugInfo == Debug::normal) r.push_back("-g");
else if (p.debugInfo == Debug::pretendC) r.push_back("-gc");
if (p.alwaysStackFrame) r.push_back("-disable-fp-elim");

View File

@@ -192,9 +192,7 @@ int main(int argc, char** argv)
VersionCondition::addPredefinedGlobalIdent("LLVM"); // For backwards compatibility.
VersionCondition::addPredefinedGlobalIdent("LDC");
VersionCondition::addPredefinedGlobalIdent("all");
#if DMDV2
VersionCondition::addPredefinedGlobalIdent("D_Version2");
#endif
// build complete fixed up list of command line arguments
std::vector<const char*> final_args;
@@ -210,11 +208,7 @@ int main(int argc, char** argv)
ConfigFile cfg_file;
// just ignore errors for now, they are still printed
#if DMDV2
#define CFG_FILENAME "ldc2.conf"
#else
#define CFG_FILENAME "ldc.conf"
#endif
cfg_file.read(global.params.argv0, (void*)main, CFG_FILENAME);
#undef CFG_FILENAME
@@ -374,16 +368,7 @@ int main(int argc, char** argv)
}
else
{
#if DMDV2
global.params.linkswitches->push(mem.strdup("-ldruntime-ldc"));
#else
global.params.linkswitches->push(mem.strdup("-lldc-runtime"));
global.params.linkswitches->push(mem.strdup("-ltango-cc-tango"));
global.params.linkswitches->push(mem.strdup("-ltango-gc-basic"));
// pass the runtime again to resolve issues
// with linking order
global.params.linkswitches->push(mem.strdup("-lldc-runtime"));
#endif
}
}
@@ -748,7 +733,6 @@ int main(int argc, char** argv)
if (global.params.doDocComments)
VersionCondition::addPredefinedGlobalIdent("D_Ddoc");
#if DMDV2
// unittests?
if (global.params.useUnitTests)
VersionCondition::addPredefinedGlobalIdent("unittest");
@@ -758,7 +742,6 @@ int main(int argc, char** argv)
if (!global.params.useArrayBounds)
VersionCondition::addPredefinedGlobalIdent("D_NoBoundsChecks");
#endif
// Initialization
Type::init(&ir);