[APIDigester] Don't check whether the stdlib was built for a different SDK

The API digester forces loading the stdlib which may pick up an stdlib
from a different SDK than the one being tested. Disable the check
enforcing loading only swiftmodules built for the same SDK.
This commit is contained in:
Alexis Laferrière
2021-06-03 09:43:46 -07:00
committed by Alexis Laferrière
parent bccea96fcc
commit 51cec86085

View File

@@ -2233,6 +2233,9 @@ swift::ide::api::getSDKNodeRoot(SDKContext &SDKCtx,
auto &Ctx = CI.getASTContext();
// Don't check if the stdlib was build with the same SDK as what is loaded
// here as some tests rely on using a different stdlib.
Ctx.SearchPathOpts.EnableSameSDKCheck = false;
// Load standard library so that Clang importer can use it.
auto *Stdlib = Ctx.getStdlibModule(/*loadIfAbsent=*/true);