lib.systems: Add examples & helpers for MSVC

This commit is contained in:
Ross Smyth
2025-07-31 11:23:13 -04:00
parent 63e24fbc20
commit 4af7c6bdee
3 changed files with 17 additions and 0 deletions

View File

@@ -120,6 +120,8 @@ let
libc = libc =
if final.isDarwin then if final.isDarwin then
"libSystem" "libSystem"
else if final.isMsvc then
"ucrt"
else if final.isMinGW then else if final.isMinGW then
"msvcrt" "msvcrt"
else if final.isWasi then else if final.isWasi then

View File

@@ -372,6 +372,17 @@ rec {
useLLVM = true; useLLVM = true;
}; };
# Target the MSVC ABI
x86_64-windows = {
config = "x86_64-pc-windows-msvc";
useLLVM = true;
};
aarch64-windows = {
config = "aarch64-pc-windows-msvc";
useLLVM = true;
};
# BSDs # BSDs
aarch64-freebsd = { aarch64-freebsd = {

View File

@@ -344,6 +344,10 @@ rec {
kernel = kernels.windows; kernel = kernels.windows;
abi = abis.gnu; abi = abis.gnu;
}; };
isMsvc = {
kernel = kernels.windows;
abi = abis.msvc;
};
isWasi = { isWasi = {
kernel = kernels.wasi; kernel = kernels.wasi;
}; };