when linking msvcrt, also link ntdll.lib

See #2073
This commit is contained in:
Andrew Kelley 2019-03-17 14:12:55 -04:00
parent c8453454e1
commit 6acabd6b57

View File

@ -1157,8 +1157,9 @@ static void add_nt_link_args(LinkJob *lj, bool is_library) {
//https://msdn.microsoft.com/en-us/library/bb531344.aspx
lj->args.append("legacy_stdio_definitions.lib");
// msvcrt depends on kernel32
// msvcrt depends on kernel32 and ntdll
lj->args.append("kernel32.lib");
lj->args.append("ntdll.lib");
} else {
lj->args.append("/NODEFAULTLIB");
if (!is_library) {