Revert to previous define-on-declare solution for -dllimport=defaultLibsOnly (#3932)

See #3931 for context.
This commit is contained in:
Martin Kinkelin 2022-03-03 19:39:01 +01:00 committed by GitHub
parent 5d1080c26d
commit f068482026
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 16 deletions

View file

@ -138,8 +138,8 @@ int linkObjToBinaryMSVC(llvm::StringRef outputPath,
if (willLinkAgainstSharedDefaultLibs) {
// Suppress linker warning LNK4217 wrt. 'importing locally defined symbol'
// (dllimport of symbol dllexported from the same binary), because there
// might be *many* of those (=> instantiated globals) if compiled without
// -linkonce-templates.
// might be *many* of those (=> instantiated globals) if compiled with
// -dllimport=all (and without -linkonce-templates).
args.push_back("/IGNORE:4217");
}