Replace "-enable-sil-linking=false" with "-disable-sil-linking".

Also, restructure so that the option isn't declared in a random library file.
(And do the same with "-sil-link-all".)

Part of the migration to the new driver.

Swift SVN r13184
This commit is contained in:
Jordan Rose
2014-01-31 00:02:46 +00:00
parent 8f7a2e4d56
commit f165afe1aa
6 changed files with 45 additions and 17 deletions

View File

@@ -434,6 +434,16 @@ static bool ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
Opts.ModuleLinkName = A->getValue();
}
if (const Arg *A = Args.getLastArg(OPT_disable_sil_linking,
OPT_sil_link_all)) {
if (A->getOption().matches(OPT_disable_sil_linking))
Opts.SILLinking = FrontendOptions::LinkNone;
else if (A->getOption().matches(OPT_sil_link_all))
Opts.SILLinking = FrontendOptions::LinkAll;
else
llvm_unreachable("Unknown SIL linking option!");
}
return false;
}