mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ClangImporter][ModuleWrap] Turn off libc warnings.
`swift-modulewrap` uses the `ClangImporter` to obtain a module loader, but it doesn't take an SDK argument (nor does anything bother to pass one), which means that when cross-compiling you get warnings about not being able to find the C library. Suppress the warning by telling the `ClangImporter` that we don't care about the C library here. rdar://115918181
This commit is contained in:
@@ -196,8 +196,11 @@ int modulewrap_main(ArrayRef<const char *> Args, const char *Argv0,
|
||||
llvm::makeIntrusiveRefCnt<llvm::vfs::OnDiskOutputBackend>());
|
||||
registerParseRequestFunctions(ASTCtx.evaluator);
|
||||
registerTypeCheckerRequestFunctions(ASTCtx.evaluator);
|
||||
|
||||
ASTCtx.addModuleLoader(ClangImporter::create(ASTCtx, ""), true);
|
||||
|
||||
ASTCtx.addModuleLoader(ClangImporter::create(ASTCtx, "",
|
||||
nullptr, nullptr,
|
||||
true),
|
||||
true);
|
||||
ModuleDecl *M = ModuleDecl::create(ASTCtx.getIdentifier("swiftmodule"), ASTCtx);
|
||||
std::unique_ptr<Lowering::TypeConverter> TC(
|
||||
new Lowering::TypeConverter(*M, ASTCtx.SILOpts.EnableSILOpaqueValues));
|
||||
|
||||
Reference in New Issue
Block a user