[embedded] When loading (sub-)modules, propagate the Embedded flag and use it for hash computation

This commit is contained in:
Kuba Mracek
2025-08-18 12:18:34 -07:00
parent e71ede14b4
commit 0f2911f3b7

View File

@@ -2079,6 +2079,11 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
GenericArgs.push_back("-stdlib=libc++");
}
}
// Inherit Embedded Swift
if (langOpts.hasFeature(Feature::Embedded)) {
genericSubInvocation.getLangOptions().enableFeature(Feature::Embedded);
}
}
/// Calculate an output filename in \p genericSubInvocation's cache path that
@@ -2912,7 +2917,10 @@ static std::string getContextHash(const CompilerInvocation &CI,
unsigned(CI.getSILOptions().EnableOSSAModules),
// Is the C++ interop enabled?
unsigned(CI.getLangOptions().EnableCXXInterop)
unsigned(CI.getLangOptions().EnableCXXInterop),
// Is Embedded Swift enabled?
unsigned(CI.getLangOptions().hasFeature(Feature::Embedded))
);
return llvm::toString(llvm::APInt(64, H), 36, /*Signed=*/false);