Skip to content

Commit

Permalink
std.zig.target: Remove some library names from isLibCLibName() for Mi…
Browse files Browse the repository at this point in the history
…nGW.

These are system DLLs, most of which MinGW provides .def files for. It just so
happens that MinGW also has some static libraries by the same name which link in
some GUID definitions.

The remaining non-MinGW library names represent libraries that are always
statically linked, so if those are requested by the user, it makes sense to
error if libc is not linked. A future enhancement could be to compile those
independent of mingw32.lib, however.

Closes #22560.
  • Loading branch information
alexrp committed Jan 29, 2025
1 parent 1cbfdb4 commit 7d699be
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lib/std/zig/target.zig
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,8 @@ pub fn isLibCLibName(target: std.Target, name: []const u8) bool {
return true;
if (eqlIgnoreCase(ignore_case, name, "ksguid"))
return true;
if (eqlIgnoreCase(ignore_case, name, "ksuser"))
return true;
if (eqlIgnoreCase(ignore_case, name, "largeint"))
return true;
if (eqlIgnoreCase(ignore_case, name, "locationapi"))
return true;
if (eqlIgnoreCase(ignore_case, name, "m"))
return true;
if (eqlIgnoreCase(ignore_case, name, "mfuuid"))
Expand All @@ -213,14 +209,8 @@ pub fn isLibCLibName(target: std.Target, name: []const u8) bool {
return true;
if (eqlIgnoreCase(ignore_case, name, "moldname"))
return true;
if (eqlIgnoreCase(ignore_case, name, "msxml2"))
return true;
if (eqlIgnoreCase(ignore_case, name, "msxml6"))
return true;
if (eqlIgnoreCase(ignore_case, name, "msvcrt-os"))
return true;
if (eqlIgnoreCase(ignore_case, name, "ntoskrnl"))
return true;
if (eqlIgnoreCase(ignore_case, name, "portabledeviceguids"))
return true;
if (eqlIgnoreCase(ignore_case, name, "pthread"))
Expand Down

0 comments on commit 7d699be

Please sign in to comment.