Add flag for minimum inlining version

This commit is contained in:
Becca Royal-Gordon
2022-03-04 10:50:46 -08:00
committed by Allan Shortlidge
parent cdcd726f92
commit bbcd980aff
7 changed files with 95 additions and 23 deletions

View File

@@ -1654,6 +1654,13 @@ InterfaceSubContextDelegateImpl::runInSubCompilerInstance(StringRef moduleName,
.setMainAndSupplementaryOutputs(outputFiles, ModuleOutputPaths);
SmallVector<const char *, 64> SubArgs;
// If the interface was emitted by a compiler that didn't print
// `-target-min-inlining-version` into it, default to using the version from
// the target triple, emulating previous behavior.
SubArgs.push_back("-target-min-inlining-version");
SubArgs.push_back("target");
std::string CompilerVersion;
// Extract compiler arguments from the interface file and use them to configure
// the compiler invocation.