mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-01 01:53:16 +01:00
Added '-Hkeep-all-bodies' switch.
The same behavior is triggered by the '-inline' switch for DMD, but this doesn't quite translate to LDC.
This commit is contained in:
@@ -187,6 +187,10 @@ cl::opt<std::string> hdrFile("Hf",
|
||||
cl::value_desc("filename"),
|
||||
cl::Prefix);
|
||||
|
||||
static cl::opt<bool, true> hdrKeepAllBodies("Hkeep-all-bodies",
|
||||
cl::desc("Keep all function bodies in .di files"),
|
||||
cl::ZeroOrMore,
|
||||
cl::location(global.params.hdrKeepAllBodies));
|
||||
|
||||
static cl::opt<bool, true> unittest("unittest",
|
||||
cl::desc("Compile in unit tests"),
|
||||
|
||||
@@ -822,7 +822,11 @@ void buildCommandLine(std::vector<const char*>& r, const Params& p)
|
||||
if (p.jsonName) r.push_back(concat("-Xf=", p.jsonName));
|
||||
if (p.ignoreUnsupportedPragmas) r.push_back("-ignore");
|
||||
if (p.enforcePropertySyntax) r.push_back("-property");
|
||||
if (p.enableInline) r.push_back("-enable-inlining");
|
||||
if (p.enableInline) {
|
||||
// -inline also influences .di generation with DMD.
|
||||
r.push_back("-enable-inlining");
|
||||
r.push_back("-Hkeep-all-bodies");
|
||||
}
|
||||
if (p.emitStaticLib) r.push_back("-lib");
|
||||
if (p.noFloat) warning("-nofloat is ignored by LDC.");
|
||||
if (p.quiet) r.push_back("-quiet"); // Undocumented.
|
||||
|
||||
Reference in New Issue
Block a user