Frontend: add a frontend flag to disable building module from textual interface

This is for testing purposes to ensure prebuilt modules are up to date.

rdar://68770805
This commit is contained in:
Xi Ge
2020-10-05 10:48:07 -07:00
parent 23dc001364
commit 00eb2e9db2
6 changed files with 44 additions and 7 deletions

View File

@@ -272,6 +272,10 @@ public:
/// built and given to the compiler invocation.
bool DisableImplicitModules = false;
/// Disable building Swift modules from textual interfaces. This should be
/// for testing purposes only.
bool DisableBuildingInterface = false;
/// When performing a dependency scanning action, only identify and output all imports
/// of the main Swift module's source files.
bool ImportPrescan = false;

View File

@@ -290,11 +290,13 @@ struct ModuleInterfaceLoaderOptions {
bool remarkOnRebuildFromInterface = false;
bool disableInterfaceLock = false;
bool disableImplicitSwiftModule = false;
bool disableBuildingInterface = false;
std::string mainExecutablePath;
ModuleInterfaceLoaderOptions(const FrontendOptions &Opts):
remarkOnRebuildFromInterface(Opts.RemarkOnRebuildFromModuleInterface),
disableInterfaceLock(Opts.DisableInterfaceFileLock),
disableImplicitSwiftModule(Opts.DisableImplicitModules),
disableBuildingInterface(Opts.DisableBuildingInterface),
mainExecutablePath(Opts.MainExecutablePath)
{
switch (Opts.RequestedAction) {