Merge remote-tracking branch 'origin/master' into master-next

This commit is contained in:
swift_jenkins
2020-07-30 21:21:37 -07:00
5 changed files with 9 additions and 1 deletions

View File

@@ -250,6 +250,9 @@ public:
/// Should we enable the dependency verifier for all primary files known to this frontend?
bool EnableIncrementalDependencyVerifier = false;
/// The path of the swift-frontend executable.
std::string MainExecutablePath;
/// The directory path we should use when print #include for the bridging header.
/// By default, we include ImplicitObjCHeaderPath directly.
llvm::Optional<std::string> BridgingHeaderDirForPrint;

View File

@@ -266,10 +266,12 @@ struct ModuleInterfaceLoaderOptions {
bool remarkOnRebuildFromInterface = false;
bool disableInterfaceLock = false;
bool disableImplicitSwiftModule = false;
std::string mainExecutablePath;
ModuleInterfaceLoaderOptions(const FrontendOptions &Opts):
remarkOnRebuildFromInterface(Opts.RemarkOnRebuildFromModuleInterface),
disableInterfaceLock(Opts.DisableInterfaceFileLock),
disableImplicitSwiftModule(Opts.DisableImplicitModules) {}
disableImplicitSwiftModule(Opts.DisableImplicitModules),
mainExecutablePath(Opts.MainExecutablePath) {}
ModuleInterfaceLoaderOptions() = default;
};

View File

@@ -52,6 +52,7 @@ void CompilerInvocation::computeRuntimeResourcePathFromExecutablePath(
}
void CompilerInvocation::setMainExecutablePath(StringRef Path) {
FrontendOpts.MainExecutablePath = Path.str();
llvm::SmallString<128> LibPath;
computeRuntimeResourcePathFromExecutablePath(Path, LibPath);
setRuntimeResourcePath(LibPath.str());

View File

@@ -1268,6 +1268,7 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
StringRef prebuiltCachePath,
bool serializeDependencyHashes,
bool trackSystemDependencies): SM(SM), Diags(Diags), ArgSaver(Allocator) {
subInvocation.setMainExecutablePath(LoaderOpts.mainExecutablePath);
inheritOptionsForBuildingInterface(searchPathOpts, langOpts);
// Configure front-end input.
auto &SubFEOpts = subInvocation.getFrontendOptions();

View File

@@ -1,3 +1,4 @@
// REQUIRES: rdar66283479
// RUN: %empty-directory(%t)
// RUN: %target-build-swift %s -o %t/a.out
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/a.out" 2>&1 | %{lldb-python} %utils/symbolicate-linux-fatal %t/a.out - | %{python} %utils/backtrace-check -u