Merge pull request #61919 from artemcm/InheritExtraClangStateForInterfaceSubInvocation

Inherit parent's extra Clang arguments when creating an interface build sub-invocation.
This commit is contained in:
Artem Chikin
2022-11-09 09:24:18 -08:00
committed by GitHub
9 changed files with 88 additions and 13 deletions

View File

@@ -345,6 +345,11 @@ public:
/// are errors. The resulting serialized AST may include errors types and
/// skip nodes entirely, depending on the errors involved.
bool AllowModuleWithCompilerErrors = false;
/// Whether or not the compiler must be strict in ensuring that implicit downstream
/// module dependency build tasks must inherit the parent compiler invocation's context,
/// such as `-Xcc` flags, etc.
bool StrictImplicitModuleContext = false;
/// Downgrade all errors emitted in the module interface verification phase
/// to warnings.

View File

@@ -300,6 +300,7 @@ struct ModuleInterfaceLoaderOptions {
bool disableImplicitSwiftModule = false;
bool disableBuildingInterface = false;
bool downgradeInterfaceVerificationError = false;
bool strictImplicitModuleContext = false;
std::string mainExecutablePath;
ModuleInterfaceLoaderOptions(const FrontendOptions &Opts):
remarkOnRebuildFromInterface(Opts.RemarkOnRebuildFromModuleInterface),
@@ -307,6 +308,7 @@ struct ModuleInterfaceLoaderOptions {
disableImplicitSwiftModule(Opts.DisableImplicitModules),
disableBuildingInterface(Opts.DisableBuildingInterface),
downgradeInterfaceVerificationError(Opts.DowngradeInterfaceVerificationError),
strictImplicitModuleContext(Opts.StrictImplicitModuleContext),
mainExecutablePath(Opts.MainExecutablePath)
{
switch (Opts.RequestedAction) {
@@ -479,7 +481,8 @@ private:
}
void
inheritOptionsForBuildingInterface(const SearchPathOptions &SearchPathOpts,
const LangOptions &LangOpts, bool suppressRemarks,
const LangOptions &LangOpts,
bool suppressRemarks,
RequireOSSAModules_t requireOSSAModules);
bool extractSwiftInterfaceVersionAndArgs(CompilerInvocation &subInvocation,
SmallVectorImpl<const char *> &SubArgs,