aboutsummaryrefslogtreecommitdiff
path: root/src/libs
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-06-02 19:02:08 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2025-06-04 05:04:29 +0200
commitcd03a0a153aae3e0450b7878b67906fb41521d13 (patch)
tree81aabde76e990bc4e26f9aa3df0db6a8a983f424 /src/libs
parent826e1c30ba81884e1a8fad8664b3da17953d89d1 (diff)
downloadzig-cd03a0a153aae3e0450b7878b67906fb41521d13.tar.gz
zig-cd03a0a153aae3e0450b7878b67906fb41521d13.zip
compiler: Don't link ucrtbased.dll when targeting *-windows-msvc in Debug mode.
Linking it by default means that we produce binaries that, effectively, only run on systems which have the Windows SDK installed because ucrtbased.dll is not redistributable, and the Windows SDK is what actually installs ucrtbased.dll into %SYSTEM32%. The resulting binaries also can't run under Wine because Wine does not provide ucrtbased.dll. It is also inconsistent with our behavior for *-windows-gnu where we always link ucrtbase.dll. See #23983, #24019, and #24053 for more details. So just use ucrtbase.dll regardless of mode. With this change, we can also drop the implicit definition of the _DEBUG macro in zig cc, which has in some cases been problematic for users. Users who want to opt into the old behavior can do so, both for *-windows-msvc and *-windows-gnu, by explicitly passing -lucrtbased and -D_DEBUG. We might consider adding a more ergonomic flag like -fdebug-crt to the zig build-* family of commands in the future. Closes #24052.
Diffstat (limited to 'src/libs')
0 files changed, 0 insertions, 0 deletions