Compare commits

...

29 Commits

Author SHA1 Message Date
rclovis
f95a0e5382 Add Auto type support for generic class parameters 2026-02-12 17:05:19 +01:00
d171ebeb04 sha256 -> hash
if the hash is in SRI form with sha256 suffix
2026-02-12 17:57:51 +08:00
8df69ae728 nix: use SRI format for hash 2026-02-12 17:57:51 +08:00
bcdd5a2bd0 windows: remove llvm-profdata
No PGO builds on windows.
2026-02-12 17:57:51 +08:00
8182119968 nix: runCommandNoCC -> runCommand
Suppresses this.
evaluation warning: 'runCommandNoCC' has been renamed to/replaced by 'runCommand'
2026-02-12 12:42:45 +08:00
0ac725e393 llvm: add gcc15 compatibility patches 2026-02-12 12:35:31 +08:00
4b0a2abfd3 update dependencies 2026-02-12 12:33:33 +08:00
0ba6158da5 msys2: python 3.14 2026-02-11 22:50:26 +08:00
5d20088fb7 get rid of lld properly 2026-02-11 22:48:54 +08:00
f9bbd82005 msys2: update 2026-02-11 22:13:02 +08:00
c96624fb69 develop: add back lld 2026-02-11 21:23:11 +08:00
05b79851b8 cargo: remove llvm_sys location export 2026-02-11 21:23:11 +08:00
4d9e3a9ae9 nix: remove unnecessary pkgs attribute access 2026-02-11 21:23:11 +08:00
1a8e5ef7b3 nix: update hydra 2026-02-11 21:23:11 +08:00
9061dd6eaf windows: remove unused clang build as nac3artiq input
The clang input there is from msys2 packages.
2026-02-11 21:23:11 +08:00
84affbea68 nix: reorganize msys2 trigger 2026-02-11 21:23:11 +08:00
b1f15fb872 llvm: tidy majorVersion inferrence 2026-02-11 21:23:11 +08:00
c27b764ede develop: remove unused entry 2026-02-11 21:23:11 +08:00
9eaf0068d0 alejandra format 2026-02-11 21:23:11 +08:00
ad374c5b60 llvm: delete unused patch 2026-02-11 21:23:11 +08:00
4528847a69 llvm: use programmable enableProjects input 2026-02-11 21:23:11 +08:00
bfa34986c5 llvm: remove unused inputs 2026-02-11 21:23:11 +08:00
d59411660b rust: remove .cargo 2026-02-11 21:23:11 +08:00
7e8a796155 nix: unify llvms 2026-02-11 21:23:11 +08:00
rclovis
a77c0ad4ac fix: resolve Auto in nested generic fields 2026-02-10 13:54:06 +01:00
813f0933b1 cargo: update dependencies 2026-02-10 15:14:26 +08:00
507e411681 flake: update ARTIQ sources used for PGO 2026-02-10 15:14:13 +08:00
rclovis
e2ab158749 Fix tests 2026-02-09 12:04:37 +01:00
rclovis
ae1303789e feature: Added auto support for nac3artiq 2026-02-09 11:35:21 +01:00
27 changed files with 1218 additions and 608 deletions

View File

@@ -1,2 +0,0 @@
[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "link-arg=-fuse-ld=lld"]

317
Cargo.lock generated
View File

@@ -74,6 +74,12 @@ dependencies = [
"windows-sys 0.61.2",
]
[[package]]
name = "anyhow"
version = "1.0.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea"
[[package]]
name = "ascii-canvas"
version = "4.0.0"
@@ -83,12 +89,6 @@ dependencies = [
"term",
]
[[package]]
name = "autocfg"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]
name = "bit-set"
version = "0.8.0"
@@ -127,9 +127,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "cc"
version = "1.2.53"
version = "1.2.55"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "755d2fce177175ffca841e9a06afdb2c4ab0f593d53b4dee48147dfaade85932"
checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29"
dependencies = [
"find-msvc-tools",
"shlex",
@@ -143,9 +143,9 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "clap"
version = "4.5.54"
version = "4.5.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394"
checksum = "6899ea499e3fb9305a65d5ebf6e3d2248c5fab291f300ad0a704fbe142eae31a"
dependencies = [
"clap_builder",
"clap_derive",
@@ -153,9 +153,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.54"
version = "4.5.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00"
checksum = "7b12c8b680195a62a8364d16b8447b01b6c2c8f9aaf68bee653be34d4245e238"
dependencies = [
"anstream",
"anstyle",
@@ -165,9 +165,9 @@ dependencies = [
[[package]]
name = "clap_derive"
version = "4.5.49"
version = "4.5.55"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671"
checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5"
dependencies = [
"heck",
"proc-macro2",
@@ -329,9 +329,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
[[package]]
name = "find-msvc-tools"
version = "0.1.8"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db"
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
[[package]]
name = "fixedbitset"
@@ -402,6 +402,19 @@ dependencies = [
"wasip2",
]
[[package]]
name = "getrandom"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec"
dependencies = [
"cfg-if",
"libc",
"r-efi",
"wasip2",
"wasip3",
]
[[package]]
name = "hashbrown"
version = "0.15.5"
@@ -423,6 +436,12 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "id-arena"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
[[package]]
name = "indexmap"
version = "2.13.0"
@@ -431,6 +450,8 @@ checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
dependencies = [
"equivalent",
"hashbrown 0.16.1",
"serde",
"serde_core",
]
[[package]]
@@ -468,9 +489,9 @@ dependencies = [
[[package]]
name = "insta"
version = "1.46.1"
version = "1.46.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "248b42847813a1550dafd15296fd9748c651d0c32194559dbc05d804d54b21e8"
checksum = "e82db8c87c7f1ccecb34ce0c24399b8a73081427f3c7c50a5d597925356115e4"
dependencies = [
"console",
"once_cell",
@@ -493,6 +514,12 @@ dependencies = [
"either",
]
[[package]]
name = "itoa"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
[[package]]
name = "keccak"
version = "0.1.5"
@@ -541,10 +568,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
version = "0.2.180"
name = "leb128fmt"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
[[package]]
name = "libc"
version = "0.2.181"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5"
[[package]]
name = "libloading"
@@ -592,18 +625,9 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
[[package]]
name = "memchr"
version = "2.7.6"
version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
[[package]]
name = "memoffset"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
dependencies = [
"autocfg",
]
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
[[package]]
name = "nac3artiq"
@@ -830,9 +854,9 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315"
[[package]]
name = "portable-atomic"
version = "1.13.0"
version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950"
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
[[package]]
name = "ppv-lite86"
@@ -849,6 +873,16 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
[[package]]
name = "prettyplease"
version = "0.2.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
dependencies = [
"proc-macro2",
"syn 2.0.114",
]
[[package]]
name = "proc-macro-error"
version = "1.0.4"
@@ -875,44 +909,41 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.105"
version = "1.0.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7"
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
dependencies = [
"unicode-ident",
]
[[package]]
name = "pyo3"
version = "0.27.2"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab53c047fcd1a1d2a8820fe84f05d6be69e9526be40cb03b73f86b6b03e6d87d"
checksum = "fcf3ccafdf54c050be48a3a086d372f77ba6615f5057211607cd30e5ac5cec6d"
dependencies = [
"indoc",
"libc",
"memoffset",
"once_cell",
"portable-atomic",
"pyo3-build-config",
"pyo3-ffi",
"pyo3-macros",
"unindent",
]
[[package]]
name = "pyo3-build-config"
version = "0.27.2"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b455933107de8642b4487ed26d912c2d899dec6114884214a0b3bb3be9261ea6"
checksum = "972720a441c91fd9c49f212a1d2d74c6e3803b231ebc8d66c51efbd7ccab11c8"
dependencies = [
"target-lexicon",
]
[[package]]
name = "pyo3-ffi"
version = "0.27.2"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c85c9cbfaddf651b1221594209aed57e9e5cff63c4d11d1feead529b872a089"
checksum = "5994456d9dab8934d600d3867571b6410f24fbd6002570ad56356733eb54859b"
dependencies = [
"libc",
"pyo3-build-config",
@@ -920,9 +951,9 @@ dependencies = [
[[package]]
name = "pyo3-macros"
version = "0.27.2"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a5b10c9bf9888125d917fb4d2ca2d25c8df94c7ab5a52e13313a07e050a3b02"
checksum = "11ce9cc8d81b3c4969748807604d92b4eef363c5bb82b1a1bdb34ec6f1093a18"
dependencies = [
"proc-macro2",
"pyo3-macros-backend",
@@ -932,9 +963,9 @@ dependencies = [
[[package]]
name = "pyo3-macros-backend"
version = "0.27.2"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03b51720d314836e53327f5871d4c0cfb4fb37cc2c4a11cc71907a86342c40f9"
checksum = "eaf4b60036a154d23282679b658e3cc7d88d3b8c9a40b43824785f232d2e1b98"
dependencies = [
"heck",
"proc-macro2",
@@ -945,9 +976,9 @@ dependencies = [
[[package]]
name = "quote"
version = "1.0.43"
version = "1.0.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a"
checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
dependencies = [
"proc-macro2",
]
@@ -999,9 +1030,9 @@ dependencies = [
[[package]]
name = "regex"
version = "1.12.2"
version = "1.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
dependencies = [
"aho-corasick",
"memchr",
@@ -1011,9 +1042,9 @@ dependencies = [
[[package]]
name = "regex-automata"
version = "0.4.13"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
dependencies = [
"aho-corasick",
"memchr",
@@ -1022,9 +1053,9 @@ dependencies = [
[[package]]
name = "regex-syntax"
version = "0.8.8"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c"
[[package]]
name = "runkernel"
@@ -1102,6 +1133,19 @@ dependencies = [
"syn 2.0.114",
]
[[package]]
name = "serde_json"
version = "1.0.149"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
dependencies = [
"itoa",
"memchr",
"serde",
"serde_core",
"zmij",
]
[[package]]
name = "sha3"
version = "0.10.8"
@@ -1126,9 +1170,9 @@ checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa"
[[package]]
name = "siphasher"
version = "1.0.1"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e"
[[package]]
name = "smallvec"
@@ -1211,12 +1255,12 @@ checksum = "b1dd07eb858a2067e2f3c7155d54e929265c264e6f37efe3ee7a8d1b5a1dd0ba"
[[package]]
name = "tempfile"
version = "3.24.0"
version = "3.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c"
checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1"
dependencies = [
"fastrand",
"getrandom 0.3.4",
"getrandom 0.4.1",
"once_cell",
"rustix",
"windows-sys 0.61.2",
@@ -1344,9 +1388,9 @@ dependencies = [
[[package]]
name = "unicode-ident"
version = "1.0.22"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e"
[[package]]
name = "unicode-xid"
@@ -1374,12 +1418,6 @@ dependencies = [
"rand",
]
[[package]]
name = "unindent"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
[[package]]
name = "utf8parse"
version = "0.2.2"
@@ -1417,6 +1455,49 @@ dependencies = [
"wit-bindgen",
]
[[package]]
name = "wasip3"
version = "0.4.0+wasi-0.3.0-rc-2026-01-06"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5"
dependencies = [
"wit-bindgen",
]
[[package]]
name = "wasm-encoder"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319"
dependencies = [
"leb128fmt",
"wasmparser",
]
[[package]]
name = "wasm-metadata"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909"
dependencies = [
"anyhow",
"indexmap",
"wasm-encoder",
"wasmparser",
]
[[package]]
name = "wasmparser"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
dependencies = [
"bitflags",
"hashbrown 0.15.5",
"indexmap",
"semver",
]
[[package]]
name = "winapi-util"
version = "0.1.11"
@@ -1519,23 +1600,111 @@ name = "wit-bindgen"
version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
dependencies = [
"wit-bindgen-rust-macro",
]
[[package]]
name = "wit-bindgen-core"
version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc"
dependencies = [
"anyhow",
"heck",
"wit-parser",
]
[[package]]
name = "wit-bindgen-rust"
version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21"
dependencies = [
"anyhow",
"heck",
"indexmap",
"prettyplease",
"syn 2.0.114",
"wasm-metadata",
"wit-bindgen-core",
"wit-component",
]
[[package]]
name = "wit-bindgen-rust-macro"
version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a"
dependencies = [
"anyhow",
"prettyplease",
"proc-macro2",
"quote",
"syn 2.0.114",
"wit-bindgen-core",
"wit-bindgen-rust",
]
[[package]]
name = "wit-component"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2"
dependencies = [
"anyhow",
"bitflags",
"indexmap",
"log",
"serde",
"serde_derive",
"serde_json",
"wasm-encoder",
"wasm-metadata",
"wasmparser",
"wit-parser",
]
[[package]]
name = "wit-parser"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736"
dependencies = [
"anyhow",
"id-arena",
"indexmap",
"log",
"semver",
"serde",
"serde_derive",
"serde_json",
"unicode-xid",
"wasmparser",
]
[[package]]
name = "zerocopy"
version = "0.8.33"
version = "0.8.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd"
checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.8.33"
version = "0.8.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1"
checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.114",
]
[[package]]
name = "zmij"
version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4de98dfa5d5b7fef4ee834d0073d560c9ca7b6c46a71d058c48db7960f8cfaf7"

6
flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1757347588,
"narHash": "sha256-tLdkkC6XnsY9EOZW9TlpesTclELy8W7lL2ClL+nma8o=",
"lastModified": 1770562336,
"narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b599843bad24621dcaa5ab60dac98f9b0eb1cabe",
"rev": "d6c71932130818840fc8fe9509cf50be8c64634f",
"type": "github"
},
"original": {

View File

@@ -11,14 +11,11 @@
pkgs32 = import nixpkgs {system = "i686-linux";};
in rec {
packages.x86_64-linux = rec {
llvm-nac3 = pkgs.callPackage ./nix/llvm {};
llvm-tools-irrt =
pkgs.runCommandNoCC "llvm-tools-irrt" {}
''
mkdir -p $out/bin
ln -s ${pkgs.llvmPackages_16.clang-unwrapped}/bin/clang $out/bin/clang-irrt
ln -s ${pkgs.llvmPackages_16.llvm.out}/bin/llvm-as $out/bin/llvm-as-irrt
'';
llvm-nac3 = pkgs.callPackage ./nix/llvm {
enableProjects = ["clang" "compiler-rt"];
llvmTools = ["llvm-config" "llvm-as" "llvm-profdata"];
};
inherit (llvm-nac3) llvm llvm-tools-irrt clang compiler-rt;
demo-linalg-stub = pkgs.rustPlatform.buildRustPackage {
name = "demo-linalg-stub";
src = ./nac3standalone/demo/linalg;
@@ -44,8 +41,8 @@
lockFile = ./Cargo.lock;
};
passthru.cargoLock = cargoLock;
nativeBuildInputs = [pkgs.python3 (pkgs.wrapClangMulti pkgs.llvmPackages_16.clang) llvm-tools-irrt pkgs.llvmPackages_16.llvm.out pkgs.llvmPackages_16.bintools llvm-nac3];
buildInputs = [pkgs.python3 llvm-nac3 pkgs.stdenv.cc.cc.lib];
nativeBuildInputs = [pkgs.python3 (pkgs.wrapClangMulti clang) llvm llvm-tools-irrt];
buildInputs = [pkgs.python3 llvm pkgs.stdenv.cc.cc.lib pkgs.zlib pkgs.ncurses];
checkInputs = [(pkgs.python3.withPackages (ps: [ps.numpy ps.scipy]))];
checkPhase = ''
echo "Checking nac3standalone demos..."
@@ -79,21 +76,28 @@
};
# LLVM PGO support
llvm-nac3-instrumented = pkgs.callPackage ./nix/llvm {
stdenv = pkgs.llvmPackages_16.stdenv;
extraCmakeFlags = ["-DLLVM_BUILD_INSTRUMENTED=IR"];
};
llvm-nac3-instrumented =
(pkgs.callPackage ./nix/llvm {
extraCmakeFlags = [
"-DLLVM_BUILD_INSTRUMENTED=IR"
"-DLLVM_BUILD_RUNTIME=No"
"-DCMAKE_C_COMPILER=${clang}/bin/clang"
"-DCMAKE_CXX_COMPILER=${clang}/bin/clang++"
"-DLLVM_NATIVE_TOOL_DIR=${llvm}/bin"
];
}).llvm;
nac3artiq-instrumented = pkgs.python3Packages.toPythonModule (
pkgs.rustPlatform.buildRustPackage {
name = "nac3artiq-instrumented";
src = self;
inherit (nac3artiq) cargoLock;
nativeBuildInputs = [pkgs.python3 packages.x86_64-linux.llvm-tools-irrt pkgs.llvmPackages_16.bintools llvm-nac3-instrumented];
buildInputs = [pkgs.python3 llvm-nac3-instrumented];
nativeBuildInputs = [pkgs.python3 llvm-tools-irrt llvm-nac3-instrumented];
buildInputs = [pkgs.python3 llvm-nac3-instrumented pkgs.zlib pkgs.ncurses];
cargoBuildFlags = ["--package" "nac3artiq" "--features" "init-llvm-profile"];
doCheck = false;
configurePhase = ''
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C link-arg=-L${pkgs.llvmPackages_16.compiler-rt}/lib/linux -C link-arg=-lclang_rt.profile-x86_64"
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C link-arg=-L${compiler-rt}/x86_64-unknown-linux-gnu -C link-arg=-lclang_rt.profile"
export LLVM_SYS_160_PREFIX=${llvm-nac3-instrumented}
'';
installPhase = ''
TARGET_DIR=$out/${pkgs.python3Packages.python.sitePackages}
@@ -105,23 +109,20 @@
nac3artiq-profile = pkgs.stdenvNoCC.mkDerivation {
name = "nac3artiq-profile";
srcs = [
(pkgs.fetchFromGitHub {
owner = "m-labs";
repo = "sipyco";
rev = "96fcefbea490a9b42c862393860d2e586b05d744";
sha256 = "sha256-DkcgZ0K6lsxzBWc31GTyufuSOpcorVv5OsZLHphHBtg=";
(pkgs.fetchgit {
url = "https://git.m-labs.hk/M-Labs/sipyco.git";
rev = "ab3d738ee302a2a37304e8ee59bb23e30bfb81ae";
hash = "sha256-85pe9Y56HhmcdYnyaiHZr56eJesoeTHLoQKcknX/Scw=";
})
(pkgs.fetchFromGitHub {
owner = "m-labs";
repo = "artiq";
rev = "ee9ccd39afeb5eab60277b745c164f3c26a1f569";
sha256 = "sha256-J8ininS9qHz7hbHzsznpqnU870PdyxYqfLI9itj3Gi8=";
(pkgs.fetchgit {
url = "https://git.m-labs.hk/M-Labs/artiq.git";
rev = "0e69d9e688a90a16cc1eb3e0e8fed836db8864f1";
hash = "sha256-31/A33oCsFpMMSc+9YO9YjwQtbxN0HXTVypgD4nfW0k=";
})
];
buildInputs = [
(python3-mimalloc.withPackages (ps: [ps.numpy ps.scipy ps.jsonschema ps.lmdb ps.platformdirs nac3artiq-instrumented]))
pkgs.llvmPackages_16.llvm.out
pkgs.llvmPackages_16.bintools
llvm
];
phases = ["buildPhase" "installPhase"];
buildPhase = ''
@@ -138,17 +139,22 @@
llvm-profdata merge -o $out/llvm.profdata /build/llvm/build/profiles/*
'';
};
llvm-nac3-pgo = pkgs.callPackage ./nix/llvm {
stdenv = pkgs.llvmPackages_16.stdenv;
extraCmakeFlags = ["-DLLVM_PROFDATA_FILE=${nac3artiq-profile}/llvm.profdata"];
};
llvm-nac3-pgo =
(pkgs.callPackage ./nix/llvm {
extraCmakeFlags = [
"-DLLVM_PROFDATA_FILE=${nac3artiq-profile}/llvm.profdata"
"-DCMAKE_C_COMPILER=${clang}/bin/clang"
"-DCMAKE_CXX_COMPILER=${clang}/bin/clang++"
"-DLLVM_NATIVE_TOOL_DIR=${llvm}/bin"
];
}).llvm;
nac3artiq-pgo = pkgs.python3Packages.toPythonModule (
pkgs.rustPlatform.buildRustPackage {
name = "nac3artiq-pgo";
src = self;
inherit (nac3artiq) cargoLock;
nativeBuildInputs = [pkgs.python3 packages.x86_64-linux.llvm-tools-irrt pkgs.llvmPackages_16.bintools llvm-nac3-pgo];
buildInputs = [pkgs.python3 llvm-nac3-pgo];
nativeBuildInputs = [pkgs.python3 llvm-tools-irrt llvm-nac3-pgo];
buildInputs = [pkgs.python3 llvm-nac3-pgo pkgs.zlib pkgs.ncurses];
cargoBuildFlags = ["--package" "nac3artiq"];
cargoTestFlags = ["--package" "nac3ast" "--package" "nac3parser" "--package" "nac3core" "--package" "nac3artiq"];
installPhase = ''
@@ -168,15 +174,14 @@
name = "nac3-dev-shell";
buildInputs = with pkgs; [
# build dependencies
packages.x86_64-linux.llvm-nac3
(pkgs.wrapClangMulti llvmPackages_16.clang)
llvmPackages_16.llvm.out
llvmPackages_16.bintools # for running nac3standalone demos
(pkgs.wrapClangMulti packages.x86_64-linux.clang)
packages.x86_64-linux.llvm
packages.x86_64-linux.llvm-tools-irrt
zlib
ncurses
cargo
rustc
# runtime dependencies
lld_16 # for running kernels on the host
(packages.x86_64-linux.python3-mimalloc.withPackages (ps: [ps.numpy ps.scipy]))
# development tools
cargo-insta
@@ -200,8 +205,9 @@
};
hydraJobs = {
inherit (packages.x86_64-linux) llvm-nac3 nac3artiq nac3artiq-pgo;
llvm-nac3-msys2 = packages.x86_64-w64-mingw32.llvm-nac3;
inherit (packages.x86_64-linux) nac3artiq nac3artiq-pgo;
llvm-nac3 = packages.x86_64-linux.llvm-nac3.llvm;
llvm-nac3-msys2 = packages.x86_64-w64-mingw32.llvm-nac3.llvm;
nac3artiq-msys2 = packages.x86_64-w64-mingw32.nac3artiq;
nac3artiq-msys2-pkg = packages.x86_64-w64-mingw32.nac3artiq-pkg;
};

View File

@@ -11,7 +11,7 @@ crate-type = ["cdylib"]
[dependencies]
indexmap = "2.12"
itertools = "0.14"
pyo3 = { version = "0.27", features = ["extension-module"] }
pyo3 = { version = "0.28", features = ["extension-module"] }
parking_lot = "0.12"
tempfile = "3.22"
nac3core = { path = "../nac3core" }

281
nac3artiq/demo/auto_type.py Normal file
View File

@@ -0,0 +1,281 @@
from __future__ import annotations
from min_artiq import *
from min_artiq import Auto
from typing import Generic, TypeVar
from numpy import int32, int64
@compile
class CPLDVersion:
"""Base class for version-specific CPLD implementations"""
def __init__(self, cpld):
self.cpld = cpld
@kernel
def cfg_write(self, cfg: int32):
pass
@kernel
def cfg_att_en(self, channel: int32, on: bool):
pass
@compile
class ProtoRev8(CPLDVersion):
"""Simulates ARTIQ's ProtoRev8 - with self-referential CPLD type."""
# Self-referential type ProtoRev8 references CPLD[ProtoRev8]
cpld: KernelInvariant[CPLD[ProtoRev8]]
@kernel
def cfg_write(self, cfg: int32):
self.cpld.cfg_reg = cfg
@kernel
def cfg_att_en(self, channel: int32, on: bool):
raise ValueError("cfg_att_en not supported on ProtoRev8")
@compile
class ProtoRev9(CPLDVersion):
"""Simulates ARTIQ's ProtoRev9 - with self-referential CPLD type."""
# Self-referential type ProtoRev9 references CPLD[ProtoRev9]
cpld: KernelInvariant[CPLD[ProtoRev9]]
@kernel
def cfg_write(self, cfg: int32):
self.cpld.cfg_reg = cfg
@kernel
def cfg_att_en(self, channel: int32, on: bool):
pass
V = TypeVar("V", ProtoRev8, ProtoRev9)
@compile
class CPLD(Generic[V]):
"""Simulates ARTIQ's CPLD class - generic over hardware revision."""
core: KernelInvariant[Core]
version: KernelInvariant[V]
cfg_reg: Kernel[int32]
def __init__(self, core: Core, version_cls, proto_rev: int32 = int32(0x09)):
self.core = core
self.cfg_reg = int32(0)
# version is created with self-reference
if proto_rev == int32(0x08):
self.version = ProtoRev8(self)
else:
self.version = ProtoRev9(self)
@kernel
def cfg_write(self, cfg: int32):
self.version.cfg_write(cfg)
@kernel
def set_att_en(self, channel: int32, on: bool):
self.version.cfg_att_en(channel, on)
@compile
class RegIOUpdate:
"""Simulates ARTIQ's RegIOUpdate - KEY: uses CPLD[Auto] not CPLD[ProtoRev9]."""
# Auto in a non-generic class field
cpld: KernelInvariant[CPLD[Auto]]
chip_select: KernelInvariant[int32]
def __init__(self, cpld, chip_select):
self.cpld = cpld
self.chip_select = chip_select
@kernel
def pulse_mu(self, duration: int64):
cfg = self.cpld.cfg_reg
self.cpld.cfg_write(cfg)
IoUpdateT = TypeVar("IoUpdateT", RegIOUpdate, TTLOut)
@compile
class AD9910(Generic[IoUpdateT]):
"""Simulates ARTIQ's AD9910 - generic over IO update type."""
core: KernelInvariant[Core]
# Auto in generic class field
cpld: KernelInvariant[CPLD[Auto]]
chip_select: KernelInvariant[int32]
io_update: KernelInvariant[IoUpdateT]
def __init__(self, core: Core, cpld, chip_select: int32):
self.core = core
self.cpld = cpld
self.chip_select = chip_select
self.io_update = RegIOUpdate(self.cpld, self.chip_select)
@kernel
def init(self):
self.cpld.cfg_write(self.chip_select)
@kernel
def get_chip_select(self) -> int32:
return self.chip_select
@compile
class SUServo:
"""Simulates ARTIQ's SUServo - KEY: uses list[AD9910[Auto]] and list[CPLD[Auto]]."""
core: KernelInvariant[Core]
# list of generic types with Auto
ddses: KernelInvariant[list[AD9910[Auto]]]
cplds: KernelInvariant[list[CPLD[Auto]]]
def __init__(self, core: Core, ddses, cplds):
self.core = core
self.ddses = ddses
self.cplds = cplds
@kernel
def init(self):
for i in range(len(self.cplds)):
cpld = self.cplds[i]
dds = self.ddses[i]
cpld.cfg_write(int32(0))
dds.init()
@compile
class Channel:
"""Simulates ARTIQ's SUServo Channel - KEY: uses AD9910[Auto]."""
core: KernelInvariant[Core]
servo: KernelInvariant[SUServo]
# AD9910[Auto] in non-generic class
dds: KernelInvariant[AD9910[Auto]]
def __init__(self, servo: SUServo, channel: int32):
self.core = servo.core
self.servo = servo
self.dds = servo.ddses[channel]
@kernel
def set_dds(self) -> int32:
return self.dds.get_chip_select()
@compile
class Inner:
core: KernelInvariant[Core]
value: KernelInvariant[int32]
def __init__(self, core: Core, v: int32):
self.core = core
self.value = v
@kernel
def get_value(self) -> int32:
return self.value
@compile
class AutoDemo:
core: KernelInvariant[Core]
# Bare Auto
x_auto: KernelInvariant[Auto] # inferred as int32
y_auto: Kernel[Auto] # inferred as int32 (mutable)
f_auto: KernelInvariant[Auto] # inferred as float
s_auto: KernelInvariant[Auto] # inferred as str
b_auto: KernelInvariant[Auto] # inferred as bool
obj_auto: KernelInvariant[Auto] # inferred as Inner
# Nested Auto
list_auto: KernelInvariant[list[Auto]] # inferred as list[int32]
# Auto in nested generic class with required constructor args
# This mirrors ARTIQ's AD9910.cpld: CPLD[Auto] pattern
dds: KernelInvariant[Auto] # inferred as AD9910[RegIOUpdate]
servo: KernelInvariant[SUServo]
channel: KernelInvariant[Channel]
def __init__(self):
self.core = Core()
self.x_auto = int32(42)
self.y_auto = int32(0)
self.f_auto = 3.14
self.s_auto = "hello"
self.b_auto = True
self.obj_auto = Inner(self.core, int32(99))
self.list_auto = [int32(1), int32(2), int32(3)]
cpld1 = CPLD(self.core, ProtoRev9, int32(0x09))
cpld2 = CPLD(self.core, ProtoRev9, int32(0x09))
dds1 = AD9910(self.core, cpld1, int32(4))
dds2 = AD9910(self.core, cpld2, int32(5))
self.dds = dds1
self.servo = SUServo(self.core, [dds1, dds2], [cpld1, cpld2])
self.channel = Channel(self.servo, int32(0))
@kernel
def test_auto_int(self) -> int32:
return self.x_auto
@kernel
def test_auto_mutable(self) -> int32:
self.y_auto = int32(10)
return self.y_auto
@kernel
def test_auto_float(self) -> float:
return self.f_auto
@kernel
def test_auto_bool(self) -> bool:
return self.b_auto
@kernel
def test_auto_object(self) -> int32:
return self.obj_auto.get_value()
@kernel
def test_auto_list(self) -> int32:
total: int32 = int32(0)
for v in self.list_auto:
total = total + v
return total
@kernel
def test_auto_nested_generic(self) -> int32:
"""Test Auto inference on a class with required constructor args
that itself contains CPLD[Auto]."""
self.dds.init()
return self.dds.get_chip_select()
@kernel
def test_suservo_list_auto(self):
"""Test list[AD9910[Auto]] and list[CPLD[Auto]] - mirrors ARTIQ SUServo."""
self.servo.init()
@kernel
def test_channel_auto(self) -> int32:
"""Test AD9910[Auto] via Channel - mirrors ARTIQ SUServo Channel."""
return self.channel.set_dds()
@kernel
def run(self):
x = self.test_auto_int()
y = self.test_auto_mutable()
f = self.test_auto_float()
b = self.test_auto_bool()
o = self.test_auto_object()
l = self.test_auto_list()
n = self.test_auto_nested_generic()
self.test_suservo_list_auto()
c = self.test_channel_auto()
if __name__ == "__main__":
AutoDemo().run()

View File

@@ -0,0 +1,103 @@
from __future__ import annotations
from min_artiq import *
from min_artiq import Auto
from typing import Generic, TypeVar
from numpy import int32
# Self-referential ProtoRev types
class ProtoRev8:
cpld: KernelInvariant[CPLD[ProtoRev8]]
def __init__(self, cpld):
self.cpld = cpld
@kernel
def cfg_write(self, cfg: int32):
self.cpld.cfg_reg = cfg
@kernel
def sta_read(self) -> int32:
return self.cpld.cfg_reg
@compile
class ProtoRev9:
cpld: KernelInvariant[CPLD[ProtoRev9]]
def __init__(self, cpld):
self.cpld = cpld
@kernel
def cfg_write(self, cfg: int32):
self.cpld.cfg_reg = cfg
@kernel
def sta_read(self) -> int32:
return self.cpld.cfg_reg
V = TypeVar("V", ProtoRev8, ProtoRev9)
@compile
class CPLD(Generic[V]):
core: KernelInvariant[Core]
version: KernelInvariant[V]
cfg_reg: Kernel[int32]
def __init__(self, core: Core, version_cls, proto_rev: int32 = int32(0x09)):
self.core = core
self.cfg_reg = int32(0)
if proto_rev == int32(0x08):
self.version = ProtoRev8(self)
else:
self.version = ProtoRev9(self)
@kernel
def cfg_write(self, cfg: int32):
self.version.cfg_write(cfg)
@kernel
def sta_read(self) -> int32:
return self.version.sta_read()
@kernel
def init(self):
pass
@compile
class UninstantiatedDevice:
core: KernelInvariant[Core]
cpld: KernelInvariant[CPLD[Auto]]
chip_select: KernelInvariant[int32]
def __init__(self, core: Core, cpld, chip_select: int32):
self.core = core
self.cpld = cpld
self.chip_select = chip_select
@kernel
def init(self):
self.cpld.cfg_write(self.chip_select)
@kernel
def get_status(self) -> int32:
return self.cpld.sta_read()
@compile
class StressDemo:
core: KernelInvariant[Core]
cpld: KernelInvariant[CPLD[Auto]]
def __init__(self):
self.core = Core()
self.cpld = CPLD(self.core, ProtoRev9, int32(0x09))
@kernel
def run(self):
self.cpld.init()
if __name__ == "__main__":
StressDemo().run()

View File

@@ -31,6 +31,9 @@ class Kernel(Generic[T]):
class KernelInvariant(Generic[T]):
pass
class Auto:
pass
# The virtual class must exist before nac3artiq.NAC3 is created.
class virtual(Generic[T]):
pass
@@ -274,6 +277,7 @@ builtins = {
},
"artiq": {
"Auto": Auto,
"Kernel": Kernel,
"KernelInvariant": KernelInvariant,
"_ConstGenericMarker": _ConstGenericMarker,

View File

@@ -189,6 +189,7 @@ impl ArtiqBuiltinRegistry {
id_to_builtin.insert(primitive_ids.builtins.staticmethod_decor_fn, PrimDef::StaticMethod);
// Type qualifier
id_to_builtin.insert(primitive_ids.artiq.auto, PrimDef::Auto);
id_to_builtin.insert(primitive_ids.artiq.kernel, PrimDef::Kernel);
id_to_builtin.insert(primitive_ids.artiq.kernel_invariant, PrimDef::KernelInvariant);
id_to_builtin.insert(primitive_ids.artiq.const_generic_marker, PrimDef::ConstGeneric);
@@ -480,6 +481,7 @@ pub struct NumpyPythonId {
#[derive(Clone)]
pub struct ArtiqPythonId {
auto: u64,
kernel: u64,
kernel_invariant: u64,
const_generic_marker: u64,
@@ -1489,14 +1491,14 @@ fn is_decor_fn_same(
Ok(decor_fn_ids.contains(&fn_id))
}
fn link_with_lld(elf_filename: &str, obj_filename: &str) -> PyResult<()> {
fn link_with_ld(elf_filename: &str, obj_filename: &str) -> PyResult<()> {
let linker_args = ["-shared", "--eh-frame-hdr", "-x", "-o", elf_filename, obj_filename];
#[cfg(not(windows))]
let lld_command = "ld.lld";
let ld_command = "ld";
#[cfg(windows)]
let lld_command = "ld.lld.exe";
match Command::new(lld_command).args(linker_args).status() {
let ld_command = "ld.exe";
match Command::new(ld_command).args(linker_args).status() {
Ok(linker_status) => {
if linker_status.success() {
Ok(())
@@ -1763,6 +1765,7 @@ impl Nac3 {
linalg_hessenberg: get_artiq_builtin_id(Some("numpy"), "sp_linalg_hessenberg")?,
},
artiq: ArtiqPythonId {
auto: get_artiq_builtin_id(Some("artiq"), "Auto")?,
kernel: get_artiq_builtin_id(Some("artiq"), "Kernel")?,
kernel_invariant: get_artiq_builtin_id(Some("artiq"), "KernelInvariant")?,
virtual_class: get_artiq_builtin_id(Some("artiq"), "virtual")?,
@@ -1910,7 +1913,7 @@ impl Nac3 {
target_machine
.write_to_file(module, FileType::Object, &working_directory.join("module.o"))
.expect("couldn't write module to file");
link_with_lld(
link_with_ld(
output_filename,
working_directory.join("module.o").to_string_lossy().to_string().as_str(),
)?;
@@ -1973,7 +1976,7 @@ impl Nac3 {
let filename_path = self.working_directory.path().join("module.elf");
let filename = filename_path.to_str().unwrap();
link_with_lld(
link_with_ld(
filename,
working_directory.join("module.o").to_string_lossy().to_string().as_str(),
)?;
@@ -2029,10 +2032,7 @@ fn symbolize<'py>(
elf_bin: &Bound<'py, PyBytes>,
pc: &Bound<'py, PyList>,
) -> PyResult<Vec<CallRecordWrapper>> {
Ok(symbolizer::symbolize(elf_bin.extract()?, pc.extract()?)
.iter()
.map(Into::into)
.collect())
Ok(symbolizer::symbolize(elf_bin.extract()?, pc.extract()?).iter().map(Into::into).collect())
}
#[cfg(feature = "init-llvm-profile")]

View File

@@ -1073,7 +1073,6 @@ impl InnerResolver {
Ok(Ok(res))
}
(TypeEnum::TObj { params, fields, .. }, false) => {
self.pyid_to_type.write().insert(py_obj_id, extracted_ty);
let var_map = into_var_map(iter_type_vars(params).map(|tvar| {
let TypeEnum::TVar { id, range, name, loc, .. } = &*unifier.get_ty(tvar.ty)
else {
@@ -1084,6 +1083,9 @@ impl InnerResolver {
let ty = unifier.get_fresh_var_with_range(range, *name, *loc).ty;
TypeVar { id: *id, ty }
}));
// Cache with fresh type variables to prevent circular references
let cache_ty = unifier.subst(extracted_ty, &var_map).unwrap_or(extracted_ty);
self.pyid_to_type.write().insert(py_obj_id, cache_ty);
let mut instantiate_obj = || {
// loop through non-function fields of the class to get the instantiated value
for field in fields {
@@ -2001,4 +2003,57 @@ impl SymbolResolver for Resolver {
let exn_ids = self.0.exception_ids.read();
exn_ids.get(&tyid).copied().unwrap_or(0)
}
fn resolve_auto_field_type(
&self,
class_name: StrRef,
field_name: StrRef,
unifier: &mut Unifier,
top_level_defs: &[Arc<RwLock<TopLevelDef>>],
primitives: &PrimitiveStore,
) -> Option<Result<Type, String>> {
// Resolve the class Python object from the module, then get the field attribute
// value and infer its type via get_obj_type.
Some(Python::attach(|py| -> PyResult<Result<Type, String>> {
let module = self.0.module.bind(py);
let class_name_str = class_name.to_string();
let simple_name = class_name_str.rsplit_once('.').map_or(class_name_str.as_str(), |(_, n)| n);
// Get the class object from the module
let Ok(class_obj) = module.getattr(simple_name) else {
return Ok(Err(format!(
"Auto type error: cannot find class `{class_name}` in module"
)));
};
// Instantiate it if it's a class (call the constructor with no args)
// or get the field directly if it's already an instance
let instance = if class_obj.is_instance_of::<pyo3::types::PyType>() {
match class_obj.call0() {
Ok(inst) => inst,
Err(e) => return Ok(Err(format!(
"Auto type error: cannot instantiate class `{class_name}` to infer field `{field_name}`: {e}"
))),
}
} else {
class_obj
};
// Get the field value
let field_name_str = field_name.to_string();
let Ok(field_val) = instance.getattr(field_name_str.as_str()) else {
return Ok(Err(format!(
"Auto type error: class `{class_name}` instance has no attribute `{field_name}`"
)));
};
// Infer the type from the Python value
match self.0.get_obj_type(py, &field_val, unifier, top_level_defs, primitives)? {
Ok(ty) => Ok(Ok(ty)),
Err(e) => Ok(Err(format!(
"Auto type error: cannot infer type of `{class_name}.{field_name}`: {e}"
))),
}
}).unwrap())
}
}

View File

@@ -380,6 +380,17 @@ pub trait SymbolResolver {
) -> Result<(), String> {
Ok(())
}
fn resolve_auto_field_type(
&self,
_class_name: StrRef,
_field_name: StrRef,
_unifier: &mut Unifier,
_top_level_defs: &[Arc<RwLock<TopLevelDef>>],
_primitives: &PrimitiveStore,
) -> Option<Result<Type, String>> {
None
}
}
/// Converts a type annotation into a [Type].

View File

@@ -356,6 +356,7 @@ impl<'a> BuiltinBuilder<'a> {
| PrimDef::Str
| PrimDef::Tuple
| PrimDef::StaticMethod
| PrimDef::Auto
| PrimDef::Kernel
| PrimDef::KernelInvariant
| PrimDef::ConstGeneric
@@ -537,6 +538,7 @@ impl<'a> BuiltinBuilder<'a> {
PrimDef::Str,
PrimDef::Tuple,
PrimDef::StaticMethod,
PrimDef::Auto,
PrimDef::Kernel,
PrimDef::KernelInvariant,
PrimDef::ConstGeneric,

View File

@@ -88,6 +88,7 @@ pub trait BuiltinRegistry: Send + Sync {
"staticmethod" => PrimDef::StaticMethod,
// Type qualifier
"Auto" => PrimDef::Auto,
"Kernel" => PrimDef::Kernel,
"KernelInvariant" => PrimDef::KernelInvariant,
"ConstGeneric" => PrimDef::ConstGeneric,
@@ -827,18 +828,23 @@ impl TopLevelComposer {
for (class_def, class_ast) in def_list.iter().skip(self.builtin_num) {
if class_ast.is_some() && matches!(&*class_def.read(), TopLevelDef::Class { .. }) {
// Collect new entries from this class into a temporary map
let mut new_entries: HashMap<Type, TypeAnnotation> = HashMap::new();
if let Err(e) = Self::analyze_single_class_methods_fields(
class_def,
&class_ast.as_ref().unwrap().node,
&temp_def_list,
unifier,
primitives_store,
&mut type_var_to_concrete_def,
&mut new_entries,
&self.builtin_registry,
) {
errors.extend(e);
}
// Merge new entries into the main map
type_var_to_concrete_def.extend(new_entries.iter().map(|(k, v)| (*k, v.clone())));
// The errors need to be reported before copying methods from parent to child classes
if !errors.is_empty() {
return Err(errors);
@@ -864,23 +870,22 @@ impl TopLevelComposer {
}
let mut subst_list = Some(Vec::new());
// unification of previously assigned typevar
let mut unification_helper = |ty, def| -> Result<(), HashSet<String>> {
let target_ty = get_type_from_type_annotation_kinds(
for (ty, def) in &new_entries {
match get_type_from_type_annotation_kinds(
&temp_def_list,
unifier,
primitives_store,
&def,
def,
&mut subst_list,
)?;
unifier
.unify(ty, target_ty)
.map_err(|e| HashSet::from([e.to_display(unifier).to_string()]))?;
Ok(())
};
for (ty, def) in &type_var_to_concrete_def {
if let Err(e) = unification_helper(*ty, def.clone()) {
errors.extend(e);
) {
Ok(target_ty) => {
if let Err(e) = unifier.unify(*ty, target_ty) {
errors.insert(e.to_display(unifier).to_string());
}
}
Err(e) => {
errors.extend(e);
}
}
}
for ty in subst_list.unwrap() {
@@ -909,6 +914,51 @@ impl TopLevelComposer {
}
}
{
let mut subst_list = Some(Vec::new());
for (ty, def) in &type_var_to_concrete_def {
match get_type_from_type_annotation_kinds(
&temp_def_list,
unifier,
primitives_store,
def,
&mut subst_list,
) {
Ok(target_ty) => {
if let Err(e) = unifier.unify(*ty, target_ty) {
errors.insert(e.to_display(unifier).to_string());
}
}
Err(e) => {
errors.extend(e);
}
}
}
for ty in subst_list.unwrap() {
let TypeEnum::TObj { obj_id, params, fields } = &*unifier.get_ty(ty) else {
unreachable!()
};
let mut new_fields = HashMap::new();
let mut need_subst = false;
for (name, (ty, mutable)) in fields {
let substituted = unifier.subst(*ty, params);
need_subst |= substituted.is_some();
new_fields.insert(*name, (substituted.unwrap_or(*ty), *mutable));
}
if need_subst {
let new_ty = unifier.add_ty(TypeEnum::TObj {
obj_id: *obj_id,
params: params.clone(),
fields: new_fields,
});
if let Err(e) = unifier.unify(ty, new_ty) {
errors.insert(e.to_display(unifier).to_string());
}
}
}
}
for (def, _) in def_list.iter().skip(self.builtin_num) {
match &*def.read() {
TopLevelDef::Class { resolver: Some(resolver), .. }
@@ -1523,6 +1573,42 @@ impl TopLevelComposer {
.into_iter()
.collect::<HashMap<_, _>>(),
)?;
let is_bare_auto = matches!(&parsed_annotation, TypeAnnotation::TypeVar(t) if {
matches!(&*unifier.get_ty(*t), TypeEnum::TVar { range, .. } if range.is_empty())
});
if is_bare_auto {
// For annotations containing bare Auto
if let Some(result) = class_resolver.resolve_auto_field_type(
class_name, *attr, unifier, temp_def_list, primitives,
) {
let resolved_ty = result.map_err(|e| HashSet::from([e]))?;
unifier.unify(dummy_field_type, resolved_ty)
.map_err(|e| HashSet::from([e.to_display(unifier).to_string()]))?;
continue;
}
} else {
// For annotations containing nested Auto (like list[Auto]),
let auto_tvars = get_type_var_contained_in_type_annotation(&parsed_annotation);
let has_auto_tvars = auto_tvars.iter().any(|tv| {
if let TypeAnnotation::TypeVar(t) = tv {
matches!(&*unifier.get_ty(*t), TypeEnum::TVar { range, .. } if range.is_empty())
&& !class_type_vars_def.iter().any(|declared_tv| unifier.unioned(*declared_tv, *t))
} else {
false
}
});
if has_auto_tvars && let Some(result) = class_resolver.resolve_auto_field_type(
class_name, *attr, unifier, temp_def_list, primitives,
) && let Ok(resolved_ty) = result {
unifier.unify(dummy_field_type, resolved_ty)
.map_err(|e| HashSet::from([e.to_display(unifier).to_string()]))?;
continue;
}
}
// find type vars within this return type annotation
let type_vars_within =
get_type_var_contained_in_type_annotation(&parsed_annotation);
@@ -1532,6 +1618,11 @@ impl TopLevelComposer {
unreachable!("must be type var annotation")
};
// Skip Auto-generated TVars, they will be resolved from runtime values later.
if let TypeEnum::TVar { range, .. } = &*unifier.get_ty(t) && range.is_empty() {
continue;
}
if !class_type_vars_def.iter().any(|declared_tv| unifier.unioned(*declared_tv, t)) {
return Err(HashSet::from([
format!(
@@ -1923,12 +2014,14 @@ impl TopLevelComposer {
// None if is not class method
let uninst_self_type = {
if let Some(class_id) = method_class.get(&DefinitionId(id)) {
let TopLevelDef::Class { type_vars, .. } =
let TopLevelDef::Class { type_vars, fields, .. } =
&*definition_ast_list.get(class_id.0).unwrap().0.read()
else {
unreachable!("must be class def")
};
let field_types: Vec<Type> = fields.iter().map(|(_, ty, _)| *ty).collect();
let ty_ann = make_self_type_annotation(type_vars, *class_id);
let self_ty = get_type_from_type_annotation_kinds(
&def_list,
@@ -1944,11 +2037,20 @@ impl TopLevelComposer {
(*id, *ty)
}));
Some((self_ty, type_vars.clone()))
Some((self_ty, type_vars.clone(), field_types))
} else {
None
}
};
// Collect TVars from class field types so that Auto TVars are treated as
// bound by is_concrete in function_check.
let mut field_tvars: Vec<Type> = Vec::new();
if let Some((_, _, ref field_types)) = uninst_self_type {
for &ty in field_types {
unifier.collect_tvar_handles(ty, &mut field_tvars);
}
}
// carefully handle those with bounds, without bounds and no typevars
// if class methods, `vars` also contains all class typevars here
let (type_var_subst_comb, no_range_vars) = {
@@ -1995,7 +2097,7 @@ impl TopLevelComposer {
.collect_vec()
};
let self_type = {
uninst_self_type.clone().map(|(self_type, type_vars)| {
uninst_self_type.clone().map(|(self_type, type_vars, _)| {
let subst_for_self = {
let class_ty_var_ids = type_vars
.iter()
@@ -2041,7 +2143,11 @@ impl TopLevelComposer {
Some(inst_ret)
},
// NOTE: allowed type vars
bound_variables: no_range_vars.clone(),
bound_variables: {
let mut bv = no_range_vars.clone();
bv.extend(&field_tvars);
bv
},
},
unifier,
variable_mapping: {

View File

@@ -59,6 +59,7 @@ pub enum PrimDef {
StaticMethod,
// Type qualifiers
Auto,
Kernel,
KernelInvariant,
ConstGeneric,
@@ -299,6 +300,7 @@ impl PrimDef {
Self::StaticMethod => class("staticmethod", |_| unimplemented!()),
// Type qualifiers
Self::Auto => class("Auto", |_| unimplemented!()),
Self::Kernel => class("Kernel", |_| unimplemented!()),
Self::KernelInvariant => class("KernelInvariant", |_| unimplemented!()),
Self::ConstGeneric => class("ConstGeneric", |_| unimplemented!()),

View File

@@ -170,9 +170,9 @@ fn test_simple_register_without_constructor(source: &str) {
"},
],
&[
"fn[[a:34], 34]",
"fn[[a:0], 24]",
"fn[[b:35], 34]",
"fn[[a:35], 35]",
"fn[[a:0], 25]",
"fn[[b:36], 35]",
],
&[
"fun",

View File

@@ -154,6 +154,12 @@ fn class_def_id_to_type_annotation<T, S: std::hash::BuildHasher + Clone>(
let all_type_vars_in_scope = type_vars_in_result.iter().all(|tv| {
if let TypeAnnotation::TypeVar(t) = tv {
// Auto-generated type variables will be inferred from runtime values.
if let TypeEnum::TVar { range, .. } = &*unifier.get_ty(*t)
&& range.is_empty()
{
return true;
}
locked.values().flatten().any(|class_tv| unifier.unioned(*class_tv, *t))
} else {
false
@@ -195,18 +201,22 @@ fn parse_name_as_type_annotation<T, S: std::hash::BuildHasher + Clone>(
) -> Result<TypeAnnotation, HashSet<String>> {
let location = &expr.location;
let ast::ExprKind::Name { id, .. } = &expr.node else { unreachable!("must be name expr here") };
if let Some(builtin) = builtin_registry.match_builtin(&erase_expr_type(expr))
&& let PrimDefDetails::PrimClass { get_ty_fn, .. } = builtin.details()
{
match builtin {
PrimDef::Exception => {
return Ok(TypeAnnotation::CustomClass {
id: PrimDef::Exception.id(),
params: Vec::default(),
});
}
_ => {
return Ok(TypeAnnotation::Primitive(get_ty_fn(primitives)));
if let Some(builtin) = builtin_registry.match_builtin(&erase_expr_type(expr)) {
if builtin == PrimDef::Auto {
let auto_var = unifier.get_fresh_var(Some(*id), Some(*location)).ty;
return Ok(TypeAnnotation::TypeVar(auto_var));
}
if let PrimDefDetails::PrimClass { get_ty_fn, .. } = builtin.details() {
match builtin {
PrimDef::Exception => {
return Ok(TypeAnnotation::CustomClass {
id: PrimDef::Exception.id(),
params: Vec::default(),
});
}
_ => {
return Ok(TypeAnnotation::Primitive(get_ty_fn(primitives)));
}
}
}
}
@@ -251,7 +261,8 @@ fn parse_class_id_as_type_annotation<T, S: std::hash::BuildHasher + Clone>(
) -> Result<TypeAnnotation, HashSet<String>> {
let obj_id = if let Some(builtin) = builtin_registry.match_builtin(&erase_expr_type(value)) {
match builtin {
PrimDef::Kernel
PrimDef::Auto
| PrimDef::Kernel
| PrimDef::KernelInvariant
| PrimDef::ConstGeneric
| PrimDef::None

View File

@@ -625,6 +625,24 @@ impl Unifier {
}
}
/// Used to collect Auto type variables from class field types so they can be
/// added to `bound_variables` for the [`is_concrete`][Self::is_concrete] check.
pub fn collect_tvar_handles(&mut self, ty: Type, result: &mut Vec<Type>) {
let to_recurse: Vec<Type> = match self.get_ty(ty).as_ref() {
TypeEnum::TVar { .. } => {
result.push(ty);
return;
}
TypeEnum::TObj { params, .. } => params.values().copied().collect(),
TypeEnum::TTuple { ty: types, .. } => types.clone(),
TypeEnum::TVirtual { ty: inner } => vec![*inner],
_ => return,
};
for t in to_recurse {
self.collect_tvar_handles(t, result);
}
}
fn restore_snapshot(&mut self) {
if let Some(snapshot) = self.snapshot.take() {
self.unification_table.restore_snapshot(snapshot);

View File

@@ -309,7 +309,7 @@ fn test_unify(
("v1", "tuple[int]"),
("v2", "list[int]"),
],
(("v1", "v2"), "Incompatible types: 3[34] and tuple[34]")
(("v1", "v2"), "Incompatible types: 3[35] and tuple[35]")
; "type mismatch"
)]
#[test_case(2,
@@ -317,7 +317,7 @@ fn test_unify(
("v1", "tuple[int]"),
("v2", "tuple[float]"),
],
(("v1", "v2"), "Incompatible types: tuple[34] and tuple[0]")
(("v1", "v2"), "Incompatible types: tuple[35] and tuple[0]")
; "tuple parameter mismatch"
)]
#[test_case(2,
@@ -325,7 +325,7 @@ fn test_unify(
("v1", "tuple[int,int]"),
("v2", "tuple[int]"),
],
(("v1", "v2"), "Tuple length mismatch: got tuple[34, 34] and tuple[34]")
(("v1", "v2"), "Tuple length mismatch: got tuple[35, 35] and tuple[35]")
; "tuple length mismatch"
)]
#[test_case(3,
@@ -445,7 +445,7 @@ fn test_typevar_range() {
let v = env.unifier.get_fresh_var_with_range(&[int, boolean], None, None).ty;
assert_eq!(
env.unify(int_list, v),
Err("Expected any one of these types: 34, 1, but got 3[34]".to_string())
Err("Expected any one of these types: 35, 1, but got 3[35]".to_string())
);
// unification between v and float
@@ -453,7 +453,7 @@ fn test_typevar_range() {
let v = env.unifier.get_fresh_var_with_range(&[int, boolean], None, None).ty;
assert_eq!(
env.unify(float, v),
Err("Expected any one of these types: 34, 1, but got 0".to_string())
Err("Expected any one of these types: 35, 1, but got 0".to_string())
);
let v1 = env.unifier.get_fresh_var_with_range(&[int, boolean], None, None).ty;
@@ -478,7 +478,7 @@ fn test_typevar_range() {
println!("float_list: {}, v: {}", env.unifier.stringify(float_list), env.unifier.stringify(v));
assert_eq!(
env.unify(float_list, v),
Err("Expected any one of these types: 34, 3[typevar6], but got 3[0]\n\nNotes:\n typevar6 ∈ {34, 1}".to_string())
Err("Expected any one of these types: 35, 3[typevar6], but got 3[0]\n\nNotes:\n typevar6 ∈ {35, 1}".to_string())
);
let a = env.unifier.get_fresh_var_with_range(&[int, float], None, None).ty;
@@ -489,7 +489,7 @@ fn test_typevar_range() {
let a = env.unifier.get_fresh_var_with_range(&[int, float], None, None).ty;
let b = env.unifier.get_fresh_var_with_range(&[boolean, float], None, None).ty;
env.unifier.unify(a, b).unwrap();
assert_eq!(env.unify(a, int), Err("Expected any one of these types: 0, but got 34".into()));
assert_eq!(env.unify(a, int), Err("Expected any one of these types: 0, but got 35".into()));
let a = env.unifier.get_fresh_var_with_range(&[int, float], None, None).ty;
let b = env.unifier.get_fresh_var_with_range(&[boolean, float], None, None).ty;
@@ -535,7 +535,7 @@ fn test_typevar_range() {
});
assert_eq!(
env.unify(a_list, int_list),
Err("Incompatible types: 3[typevar23] and 3[34]\
Err("Incompatible types: 3[typevar23] and 3[35]\
\n\nNotes:\n typevar23 ∈ {0}"
.into())
);
@@ -556,7 +556,7 @@ fn test_typevar_range() {
env.unifier.unify(a_list, b_list).unwrap();
assert_eq!(
env.unify(b, boolean),
Err("Expected any one of these types: 34, 0, but got 1".into())
Err("Expected any one of these types: 35, 0, but got 1".into())
);
}
@@ -584,7 +584,7 @@ fn test_rigid_var() {
env.unifier.unify(list_a, list_x).unwrap();
assert_eq!(
env.unify(list_x, list_int),
Err("Incompatible types: 3[typevar3] and 3[34]".to_string())
Err("Incompatible types: 3[typevar3] and 3[35]".to_string())
);
env.unifier.replace_rigid_var(a, int);

View File

@@ -58,7 +58,7 @@ rm -f ./*.o ./*.bc demo
if [ -z "$i686" ]; then
$nac3standalone "${nac3args[@]}"
clang -g -c -std=gnu11 -Wall -Wextra -O3 -o demo.o demo.c
clang -o demo module.o demo.o $DEMO_LINALG_STUB -fuse-ld=lld -lm
clang -o demo module.o demo.o $DEMO_LINALG_STUB -lm
else
$nac3standalone --triple i686-unknown-linux-gnu --target-features +sse2 "${nac3args[@]}"
clang -g -m32 -c -std=gnu11 -Wall -Wextra -O3 -msse2 -o demo.o demo.c

View File

@@ -0,0 +1,12 @@
diff --git a/compiler-rt/lib/orc/error.h b/compiler-rt/lib/orc/error.h
index 4c378ecc01c4..57bc6a15e1ce 100644
--- a/compiler-rt/lib/orc/error.h
+++ b/compiler-rt/lib/orc/error.h
@@ -15,6 +15,7 @@
#include <cassert>
#include <memory>
+#include <cstdint>
#include <string>
#include <type_traits>

View File

@@ -1,161 +1,160 @@
{
lib,
stdenv,
pkgsBuildBuild,
wineWowPackages,
fetchurl,
fetchpatch,
cmake,
python3,
libbfd,
ncurses,
zlib,
which,
debugVersion ? false,
enableSharedLibraries ? false,
ninja,
libxcrypt,
msys2-env ? null,
extraCmakeFlags ? [],
enableProjects ? [],
llvmTools ? ["llvm-config"],
extraConfig ? "",
runCommand,
wrapCCWith,
}: let
inherit (lib) optional optionals optionalString;
sources = import ../llvm/sources.nix {inherit fetchurl;};
in
stdenv.mkDerivation rec {
pname = "llvm";
inherit (sources) version;
sources = import ../llvm/sources.nix {
inherit fetchurl;
};
in rec {
exe_suffix =
if msys2-env == null
then ""
else ".exe";
llvm = stdenv.mkDerivation rec {
pname = "llvm-nac3";
version = sources.version;
nativeBuildInputs =
if msys2-env == null
then [cmake python3 ninja]
else [wineWowPackages.stable];
buildInputs =
if msys2-env == null
then [libxcrypt]
else [];
propagatedBuildInputs =
if msys2-env == null
then [ncurses zlib]
else [];
phases = ["unpackPhase" "patchPhase" "configurePhase" "buildPhase" "installPhase"];
unpackPhase = ''
mkdir llvm
tar xf ${sources.llvm} -C llvm --strip-components=1
tar xf ${sources.cmake} -C llvm/cmake --strip-components=2
mkdir cmake
ln -s $PWD/llvm/cmake cmake/Modules
sourceRoot=$PWD/llvm
'';
outputs = ["out" "lib" "dev" "python"];
nativeBuildInputs = [cmake python3];
buildInputs = [];
propagatedBuildInputs = [ncurses zlib];
checkInputs = [which];
patches = [
./gnu-install-dirs.patch
];
postPatch = ''
# FileSystem permissions tests fail with various special bits
substituteInPlace unittests/Support/CMakeLists.txt \
--replace-fail "Path.cpp" ""
rm unittests/Support/Path.cpp
substituteInPlace unittests/IR/CMakeLists.txt \
--replace-fail "PassBuilderCallbacksTest.cpp" ""
rm unittests/IR/PassBuilderCallbacksTest.cpp
rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
patchShebangs test/BugPoint/compile-custom.ll.py
'';
# hacky fix: created binaries need to be run before installation
preBuild = ''
mkdir -p $out/
ln -sv $PWD/lib $out
'';
# E.g. mesa.drivers use the build-id as a cache key (see #93946):
LDFLAGS = optionalString enableSharedLibraries "-Wl,--build-id=sha1";
cmakeFlags = with stdenv;
cmakeFlags =
[
"-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm"
"-DCMAKE_BUILD_TYPE=${
if debugVersion
then "Debug"
else "Release"
}"
"-DLLVM_INCLUDE_TESTS=OFF"
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
"-DCMAKE_BUILD_TYPE=Release"
"-DLLVM_ENABLE_UNWIND_TABLES=OFF"
"-DLLVM_ENABLE_THREADS=ON"
"-DLLVM_TARGETS_TO_BUILD=X86\;ARM\;RISCV"
"-DLLVM_LINK_LLVM_DYLIB=OFF"
"-DLLVM_ENABLE_FFI=OFF"
"-DFFI_INCLUDE_DIR=fck-cmake"
"-DFFI_LIBRARY_DIR=fck-cmake"
"-DLLVM_ENABLE_LIBXML2=OFF"
"-DLLVM_INCLUDE_TESTS=OFF"
"-DLLVM_INCLUDE_BENCHMARKS=OFF"
"-DLLVM_BUILD_TOOLS=OFF"
"-DLLVM_TARGETS_TO_BUILD=X86;ARM;RISCV"
]
++ optionals enableSharedLibraries [
"-DLLVM_LINK_LLVM_DYLIB=ON"
]
++ optionals (!isDarwin && !stdenv.targetPlatform.isMinGW) [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
]
++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"-DCMAKE_CROSSCOMPILING=True"
(
let
nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc;
nativeBintools = nativeCC.bintools.bintools;
nativeToolchainFlags = [
"-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
"-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
"-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
"-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
"-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
];
in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list=${lib.concatStringsSep ";" nativeToolchainFlags}"
)
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
("-DLLVM_ENABLE_PROJECTS=" + (lib.strings.concatStringsSep "\;" enableProjects))
]
++ extraCmakeFlags;
postBuild = ''
make llvm-config
rm -fR $out
'';
cmdPrefix =
if msys2-env == null
then ""
else "wine64";
preCheck = ''
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib
'';
postInstall =
unpackPhase =
''
cp bin/llvm-config $out/bin
mkdir -p $python/share
mv $out/share/opt-viewer $python/share/opt-viewer
moveToOutput "bin/llvm-config*" "$dev"
substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${
if debugVersion
then "debug"
else "release"
}.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
--replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
--replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")'
mkdir llvm
tar xf ${sources.llvm} -C llvm --strip-components=1
tar xf ${sources.cmake} -C llvm/cmake --strip-components=2
''
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
+ (lib.strings.concatStrings (map (proj: "mkdir " + proj + "\ntar xf " + builtins.getAttr proj sources + " -C " + proj + " --strip-components=1\n") enableProjects))
+ ''
mkdir cmake
ln -s $PWD/llvm/cmake cmake/Modules
'';
doCheck = false; # the ABI change breaks RISC-V FP tests
checkTarget = "check-all";
requiredSystemFeatures = ["big-parallel"];
meta = {
homepage = "https://llvm.org/";
description = "A collection of modular and reusable compiler and toolchain technologies";
longDescription = ''
The LLVM Project is a collection of modular and reusable compiler and
toolchain technologies. Despite its name, LLVM has little to do with
traditional virtual machines. The name "LLVM" itself is not an acronym; it
is the full name of the project.
LLVM began as a research project at the University of Illinois, with the
goal of providing a modern, SSA-based compilation strategy capable of
supporting both static and dynamic compilation of arbitrary programming
languages. Since then, LLVM has grown to be an umbrella project consisting
of a number of subprojects, many of which are being used in production by
a wide variety of commercial and open source projects as well as being
widely used in academic research. Code in the LLVM project is licensed
under the "Apache 2.0 License with LLVM exceptions".
patches =
[]
++ optionals (msys2-env == null) ([
# Aggregate of 2 merged patches:
# https://github.com/llvm/llvm-project/commit/7e44305041d96b064c197216b931ae3917a34ac1.patch
# https://github.com/llvm/llvm-project/commit/7abf44069aec61eee147ca67a6333fc34583b524.patch
# Both to appease gcc15.
./llvm-gcc15.patch
]
++ lib.lists.flatten (map (proj:
if proj == "compiler-rt"
then [
./compiler-rt-gcc15.patch # Ditto. But no commits on compiler-rt.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/59978b21ad9c65276ee8e14f26759691b8a65763.patch";
sha256 = "sha256-JrGBvwVtAat/HwT1PCq2TXCDwx/dZOUB/ThNFVJ5pMg=";
})
]
else [])
enableProjects));
configurePhase =
''
cd llvm
''
+ optionalString (msys2-env != null) ''
export WINEDEBUG=-all
export WINEPATH=Z:${msys2-env}/clang64/bin
''
+ ''
export HOME=`mktemp -d`
''
+ extraConfig
+ ''
mkdir build
cd build
${cmdPrefix} cmake -G "Ninja" .. $cmakeFlags
'';
buildPhase =
''
${cmdPrefix} ninja -j $NIX_BUILD_CORES
''
+ (lib.strings.concatStrings (map (tool: "${cmdPrefix} ninja -j $NIX_BUILD_CORES " + tool + "\n") llvmTools));
installPhase =
''
${cmdPrefix} ninja install
''
+ (lib.strings.concatStrings (map (tool: "cp bin/" + tool + "${exe_suffix} $out/bin\n") llvmTools));
dontFixup = true;
};
llvm-tools-irrt =
runCommand "llvm-tools-irrt" {}
''
mkdir -p $out/bin
ln -s ${llvm}/bin/clang${exe_suffix} $out/bin/clang-irrt${exe_suffix}
ln -s ${llvm}/bin/llvm-as${exe_suffix} $out/bin/llvm-as-irrt${exe_suffix}
'';
clang = wrapCCWith rec {
cc = stdenv.mkDerivation {
name = "clang-nac3";
dontUnpack = true;
installPhase = ''
mkdir -p $out/lib
mkdir -p $out/bin
cp -r ${llvm}/bin $out
cp -r ${llvm}/lib $out
'';
passthru.isClang = true;
};
}
};
compiler-rt = stdenv.mkDerivation {
name = "compiler-rt";
dontUnpack = true;
installPhase = ''
cp -r ${llvm}/lib/clang/${builtins.elemAt (lib.strings.splitString "." sources.version) 0}/lib $out
'';
};
}

View File

@@ -1,161 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e25e0407db2..72f031a82b75 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -995,7 +995,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "")
add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src
${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime)
install(TARGETS tf_xla_runtime EXPORT LLVMExports
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime)
# Once we add more modules, we should handle this more automatically.
if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL)
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index 93e6d67551de..8d367457af5a 100644
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -874,8 +874,8 @@ macro(add_llvm_library name)
get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
install(TARGETS ${name}
${export_to_llvmexports}
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name})
if (NOT LLVM_ENABLE_IDE)
@@ -2043,7 +2043,7 @@ function(llvm_install_library_symlink name dest type)
set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
- set(output_dir lib${LLVM_LIBDIR_SUFFIX})
+ set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
if(WIN32 AND "${type}" STREQUAL "SHARED")
set(output_dir "${CMAKE_INSTALL_BINDIR}")
endif()
@@ -2312,16 +2312,37 @@ function(llvm_setup_rpath name)
if (APPLE)
set(_install_name_dir INSTALL_NAME_DIR "@rpath")
- set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS)
# $ORIGIN is not interpreted at link time by aix ld.
# Since BUILD_SHARED_LIBS is only recommended for use by developers,
# hardcode the rpath to build/install lib dir first in this mode.
# FIXME: update this when there is better solution.
- set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
elseif(UNIX)
- set(_build_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
- set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}")
+ # Note that we add `extra_libdir` (aka `LLVM_LIBRARY_DIR` in our case) back
+ # to `_install_rpath` here.
+ #
+ # In nixpkgs we do not build and install LLVM alongside rdeps of LLVM (i.e.
+ # clang); instead LLVM is its own package and thus lands at its own nix
+ # store path. This makes it so that the default relative rpath (`../lib/`)
+ # does not point at the LLVM shared objects.
+ #
+ # More discussion here:
+ # - https://github.com/NixOS/nixpkgs/pull/235624#discussion_r1220150329
+ # - https://reviews.llvm.org/D146918 (16.0.5+)
+ #
+ # Note that we leave `extra_libdir` in `_build_rpath`: without FHS there is
+ # no potential that this will result in us pulling in the "wrong" LLVM.
+ # Adding this to the build rpath means we aren't forced to use
+ # `installCheckPhase` instead of `checkPhase` (i.e. binaries in the build
+ # dir, pre-install, will have the right rpath for LLVM).
+ #
+ # As noted in the differential above, an alternative solution is to have
+ # all rdeps of nixpkgs' LLVM (that use the AddLLVM.cmake machinery) set
+ # `CMAKE_INSTALL_RPATH`.
+ set(_build_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
set_property(TARGET ${name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-z,origin ")
diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
index 891c9e6d618c..8d963f3b0069 100644
--- a/cmake/modules/AddOCaml.cmake
+++ b/cmake/modules/AddOCaml.cmake
@@ -147,9 +147,9 @@ function(add_ocaml_library name)
endforeach()
if( APPLE )
- set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
+ set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
elseif( UNIX )
- set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
+ set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
endif()
list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
index d99af79aa38e..21e794224b99 100644
--- a/cmake/modules/CMakeLists.txt
+++ b/cmake/modules/CMakeLists.txt
@@ -127,7 +127,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
)
list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS)
-extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "lib\${LLVM_LIBDIR_SUFFIX}")
+extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
set(LLVM_CONFIG_LIBRARY_DIRS
"${LLVM_CONFIG_LIBRARY_DIR}"
# FIXME: Should there be other entries here?
diff --git a/docs/CMake.rst b/docs/CMake.rst
index 7926de258ec8..5ae01adc3905 100644
--- a/docs/CMake.rst
+++ b/docs/CMake.rst
@@ -250,7 +250,7 @@ description is in `LLVM-related variables`_ below.
**LLVM_LIBDIR_SUFFIX**:STRING
Extra suffix to append to the directory where libraries are to be
installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
- to install libraries to ``/usr/lib64``.
+ to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
**LLVM_PARALLEL_{COMPILE,LINK}_JOBS**:STRING
Building the llvm toolchain can use a lot of resources, particularly
@@ -284,6 +284,10 @@ manual, or execute ``cmake --help-variable VARIABLE_NAME``.
The path to install executables, relative to the *CMAKE_INSTALL_PREFIX*.
Defaults to "bin".
+**CMAKE_INSTALL_LIBDIR**:PATH
+ The path to install libraries, relative to the *CMAKE_INSTALL_PREFIX*.
+ Defaults to "lib".
+
**CMAKE_INSTALL_INCLUDEDIR**:PATH
The path to install header files, relative to the *CMAKE_INSTALL_PREFIX*.
Defaults to "include".
diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
index 370005cd8d7d..7e790bc52111 100644
--- a/tools/llvm-config/BuildVariables.inc.in
+++ b/tools/llvm-config/BuildVariables.inc.in
@@ -23,6 +23,7 @@
#define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
#define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
#define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
+#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
#define LLVM_INSTALL_PACKAGE_DIR "@LLVM_INSTALL_PACKAGE_DIR@"
#define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
index b1d795a0a349..de6cb1514f05 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -366,7 +366,11 @@ int main(int argc, char **argv) {
sys::fs::make_absolute(ActivePrefix, Path);
ActiveBinDir = std::string(Path.str());
}
- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+ {
+ SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX);
+ sys::fs::make_absolute(ActivePrefix, Path);
+ ActiveLibDir = std::string(Path.str());
+ }
{
SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR);
sys::fs::make_absolute(ActivePrefix, Path);

24
nix/llvm/llvm-gcc15.patch Normal file
View File

@@ -0,0 +1,24 @@
diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h
index 98dce891688d..b57d8f32e9d7 100644
--- a/llvm/include/llvm/ADT/SmallVector.h
+++ b/llvm/include/llvm/ADT/SmallVector.h
@@ -26,6 +26,7 @@
#include <iterator>
#include <limits>
#include <memory>
+#include <cstdint>
#include <new>
#include <type_traits>
#include <utility>
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h b/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
index d0530bd4d650..bb73c0dee3b6 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
@@ -15,6 +15,7 @@
#include <memory>
#include <string>
+#include <cstdint>
namespace llvm {
class formatted_raw_ostream;

View File

@@ -2,14 +2,18 @@
version = "16.0.6";
cmake = fetchurl {
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/cmake-${version}.src.tar.xz";
sha256 = "sha256-OdNCpBYQldLyj7ElPkWFl4rFBSERfaZm4rH28oti9RQ=";
hash = "sha256-OdNCpBYQldLyj7ElPkWFl4rFBSERfaZm4rH28oti9RQ=";
};
llvm = fetchurl {
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-${version}.src.tar.xz";
sha256 = "sha256-6R20TRs7scM/zqmn0fJCO4g+qpFj09VsoqptLwcRvCk=";
hash = "sha256-6R20TRs7scM/zqmn0fJCO4g+qpFj09VsoqptLwcRvCk=";
};
clang = fetchurl {
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/clang-${version}.src.tar.xz";
sha256 = "sha256-EYa25u7+rdCZEu1zs3KehbWfBDckuygYqVouwCRXGEA=";
hash = "sha256-EYa25u7+rdCZEu1zs3KehbWfBDckuygYqVouwCRXGEA=";
};
compiler-rt = fetchurl {
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/compiler-rt-${version}.src.tar.xz";
hash = "sha256-eRGiqcyhA5Ohf2N8Aab1VVsKOPZP9H3JFoQTpBkLwts=";
};
}

View File

@@ -21,6 +21,6 @@ build() {
}
package() {
mkdir -p $pkgdir/clang64/lib/python3.13/site-packages
cp ${srcdir}/nac3artiq.pyd $pkgdir/clang64/lib/python3.13/site-packages
mkdir -p $pkgdir/clang64/lib/python3.14/site-packages
cp ${srcdir}/nac3artiq.pyd $pkgdir/clang64/lib/python3.14/site-packages
}

View File

@@ -20,10 +20,10 @@
name = "pyo3-mingw-config";
text = ''
implementation=CPython
version=3.13
version=3.14
shared=true
abi3=false
lib_name=python3.13
lib_name=python3.14
lib_dir=${msys2-env}/clang64/lib
pointer_width=64
build_flags=WITH_THREAD
@@ -32,48 +32,14 @@
};
sources = import ../llvm/sources.nix {inherit (pkgs) fetchurl;};
in rec {
llvm-nac3 = pkgs.stdenvNoCC.mkDerivation rec {
pname = "llvm-nac3-msys2";
version = "16.0.6";
buildInputs = [pkgs.wineWowPackages.stable];
phases = ["unpackPhase" "patchPhase" "configurePhase" "buildPhase" "installPhase"];
unpackPhase = ''
mkdir llvm
tar xf ${sources.llvm} -C llvm --strip-components=1
tar xf ${sources.cmake} -C llvm/cmake --strip-components=2
mkdir clang
tar xf ${sources.clang} -C clang --strip-components=1
mkdir cmake
ln -s $PWD/llvm/cmake cmake/Modules
cd llvm
# build of llvm-lto fails and -DLLVM_BUILD_TOOLS=OFF does not disable it reliably because cmake
rm -rf tools/lto
rm -rf tools/sancov
'';
configurePhase = ''
export HOME=`mktemp -d`
export WINEDEBUG=-all
export WINEPATH=Z:${msys2-env}/clang64/bin
${silenceFontconfig}
mkdir build
cd build
wine64 cmake .. -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_UNWIND_TABLES=OFF -DLLVM_ENABLE_THREADS=ON -DLLVM_TARGETS_TO_BUILD=X86\;ARM\;RISCV -DLLVM_LINK_LLVM_DYLIB=OFF -DLLVM_ENABLE_FFI=OFF -DFFI_INCLUDE_DIR=fck-cmake -DFFI_LIBRARY_DIR=fck-cmake -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_INSTALL_PREFIX=Z:$out
'';
buildPhase = ''
wine64 ninja -j $NIX_BUILD_CORES
'';
installPhase = ''
wine64 ninja install
'';
dontFixup = true;
llvm-nac3 = pkgs.callPackage ../llvm {
stdenv = pkgs.stdenvNoCC;
inherit msys2-env;
enableProjects = ["clang"];
llvmTools = ["llvm-config" "llvm-as"];
extraConfig = silenceFontconfig;
};
llvm-tools-irrt =
pkgs.runCommandNoCC "llvm-tools-irrt" {}
''
mkdir -p $out/bin
ln -s ${llvm-nac3}/bin/clang.exe $out/bin/clang-irrt.exe
ln -s ${llvm-nac3}/bin/llvm-as.exe $out/bin/llvm-as-irrt.exe
'';
inherit (llvm-nac3) llvm llvm-tools-irrt compiler-rt;
nac3artiq = pkgs.rustPlatform.buildRustPackage {
name = "nac3artiq-msys2";
src = ../../.;
@@ -84,11 +50,11 @@ in rec {
buildPhase = ''
export HOME=`mktemp -d`
export WINEDEBUG=-all
export WINEPATH=Z:${msys2-env}/clang64/bin\;Z:${llvm-nac3}/bin\;Z:${llvm-tools-irrt}/bin
export WINEPATH=Z:${msys2-env}/clang64/bin\;Z:${llvm}/bin\;Z:${llvm-tools-irrt}/bin
${silenceFontconfig}
export PYO3_CONFIG_FILE=Z:${pyo3-mingw-config}
export CC=clang
export LLVM_SYS_160_PREFIX=Z:${llvm-nac3}
export LLVM_SYS_160_PREFIX=Z:${llvm}
wine64 cargo build --release -p nac3artiq
'';
installPhase = ''
@@ -122,7 +88,7 @@ in rec {
pkgs.writeShellScriptBin "wine-msys2"
''
export WINEDEBUG=-all
export WINEPATH=Z:${msys2-env}/clang64/bin\;Z:${llvm-nac3}/bin\;Z:${llvm-tools-irrt}/bin
export WINEPATH=Z:${msys2-env}/clang64/bin\;Z:${llvm}/bin\;Z:${llvm-tools-irrt}/bin
export PYO3_CONFIG_FILE=Z:${pyo3-mingw-config}
exec ${pkgs.wineWowPackages.stable}/bin/wine64 cmd
'';

View File

@@ -30,9 +30,9 @@
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-libxml2-2.15.1-3-any.pkg.tar.zst";
sha256 = "1j34v0y696pbq7w83b2lkgxwwy3a704b9j1ldhfla2j270sbhh2z";
name = "mingw-w64-clang-x86_64-libxml2-2.15.1-3-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-libxml2-2.15.1-4-any.pkg.tar.zst";
sha256 = "0gxfry71x3p3lchm56fcj3pcz450vszvsc09b47c8fsagpr54afx";
name = "mingw-w64-clang-x86_64-libxml2-2.15.1-4-any.pkg.tar.zst";
})
(pkgs.fetchurl {
@@ -42,63 +42,63 @@
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-llvm-libs-21.1.8-3-any.pkg.tar.zst";
sha256 = "054w3cmsn56lhijqxy2qm84hnwcajgb7dc357gyvz233qd0vrfxs";
name = "mingw-w64-clang-x86_64-llvm-libs-21.1.8-3-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-llvm-libs-21.1.8-4-any.pkg.tar.zst";
sha256 = "04wfw2d8f8ymd5p6ma1ry1ixhq8ay87bch38msp0xafziqx0a18z";
name = "mingw-w64-clang-x86_64-llvm-libs-21.1.8-4-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-clang-libs-21.1.8-3-any.pkg.tar.zst";
sha256 = "0irhzwg741r31v73dhfvivgaim79928vwyh4xfvj84xw3hrsfz2h";
name = "mingw-w64-clang-x86_64-clang-libs-21.1.8-3-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-clang-libs-21.1.8-4-any.pkg.tar.zst";
sha256 = "0v7m4s12n1iff3xp48hglrym0533izxi6zi5j5sqv8lfq15l092r";
name = "mingw-w64-clang-x86_64-clang-libs-21.1.8-4-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-compiler-rt-21.1.8-3-any.pkg.tar.zst";
sha256 = "0iv9lcacclidyijpp5by34gvcy6fkvjdhvskaiyz6x1b1pikcfiy";
name = "mingw-w64-clang-x86_64-compiler-rt-21.1.8-3-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-compiler-rt-21.1.8-4-any.pkg.tar.zst";
sha256 = "0ps2msgzhh11jzrd9gazqpsxharqjqc2h3xr3vs11k6vfv9zgvqv";
name = "mingw-w64-clang-x86_64-compiler-rt-21.1.8-4-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-llvm-tools-21.1.8-3-any.pkg.tar.zst";
sha256 = "1792prr67q3iz3b9x14p650ayvi1292ywmici5xdsyrn4vc1fn57";
name = "mingw-w64-clang-x86_64-llvm-tools-21.1.8-3-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-llvm-tools-21.1.8-4-any.pkg.tar.zst";
sha256 = "1hw6mb2ajazqhr04kfyn47prpfwxwjs74slizvhi4y8h6jy2xmag";
name = "mingw-w64-clang-x86_64-llvm-tools-21.1.8-4-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-headers-13.0.0.r453.gfd36ef357-1-any.pkg.tar.zst";
sha256 = "0kb5yv43l1pnbvbf8s729mjv6jkqwzh4fhw7b0lbwqqs77373iyg";
name = "mingw-w64-clang-x86_64-headers-13.0.0.r453.gfd36ef357-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-headers-13.0.0.r505.g7d006b2ea-1-any.pkg.tar.zst";
sha256 = "0k35b784fqsz7pxr7wyi55kqv2bz10zac2nsw2ipjjf3rs1qxx5b";
name = "mingw-w64-clang-x86_64-headers-13.0.0.r505.g7d006b2ea-1-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-crt-13.0.0.r453.gfd36ef357-1-any.pkg.tar.zst";
sha256 = "02dcjx1m5pv50mclj647fgpw5bzr18nabziyc32b8ba8gjz61cnl";
name = "mingw-w64-clang-x86_64-crt-13.0.0.r453.gfd36ef357-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-crt-13.0.0.r505.g7d006b2ea-1-any.pkg.tar.zst";
sha256 = "1k6j4xpbhqi1wj78wal82c4nqygqcfs44ki96vax4sfp675257x0";
name = "mingw-w64-clang-x86_64-crt-13.0.0.r505.g7d006b2ea-1-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-lld-21.1.8-3-any.pkg.tar.zst";
sha256 = "142s0n6vr4hcy6m7cr8fbcbm44nvxindvh5lwkg1d2nc1s0dbdvy";
name = "mingw-w64-clang-x86_64-lld-21.1.8-3-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-lld-21.1.8-4-any.pkg.tar.zst";
sha256 = "0mdhadzmk81zzzag2qvnxgx1rqzv48c625h1fy2czapal2nsb10f";
name = "mingw-w64-clang-x86_64-lld-21.1.8-4-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-libwinpthread-13.0.0.r453.gfd36ef357-1-any.pkg.tar.zst";
sha256 = "0rdc550dmmqf4sgsbz95zm1dmlj7plf632bz48vcd84mvny0p6s1";
name = "mingw-w64-clang-x86_64-libwinpthread-13.0.0.r453.gfd36ef357-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-libwinpthread-13.0.0.r505.g7d006b2ea-1-any.pkg.tar.zst";
sha256 = "1j03naf8iyq7zf2d7rgvw2z6vjab167l5q9s7n4bdbhj1mcr46xl";
name = "mingw-w64-clang-x86_64-libwinpthread-13.0.0.r505.g7d006b2ea-1-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-winpthreads-13.0.0.r453.gfd36ef357-1-any.pkg.tar.zst";
sha256 = "1py0hmlbaifqvpvnrbwzn2xp1saqsvxn3sbfgdwmvkgljgz3ifli";
name = "mingw-w64-clang-x86_64-winpthreads-13.0.0.r453.gfd36ef357-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-winpthreads-13.0.0.r505.g7d006b2ea-1-any.pkg.tar.zst";
sha256 = "0q0h302nxrj4gfkkx112i2xj5sqjhz8nbnkd1zkycmg917j61kkm";
name = "mingw-w64-clang-x86_64-winpthreads-13.0.0.r505.g7d006b2ea-1-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-clang-21.1.8-3-any.pkg.tar.zst";
sha256 = "0ajswwv6rmscm1slb0m0m6g6igd7v7j1snrhqw7bsnvrhnvwf9jv";
name = "mingw-w64-clang-x86_64-clang-21.1.8-3-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-clang-21.1.8-4-any.pkg.tar.zst";
sha256 = "19fvj9pmdfr8zpz45r9ca32mq25592863rdk8rcsvbpb4dflzw9x";
name = "mingw-w64-clang-x86_64-clang-21.1.8-4-any.pkg.tar.zst";
})
(pkgs.fetchurl {
@@ -108,15 +108,15 @@
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-openssl-3.6.0-1-any.pkg.tar.zst";
sha256 = "001ss0mzn618idcrwkgxlv7zc21j10dha46l8hxsxwgacrijv0b3";
name = "mingw-w64-clang-x86_64-openssl-3.6.0-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-openssl-3.6.1-3-any.pkg.tar.zst";
sha256 = "1pq166imxcrlq27fq0rb56jk9b2dlayky04ad8hx4kyrdps5rihg";
name = "mingw-w64-clang-x86_64-openssl-3.6.1-3-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-libssh2-1.11.1-1-any.pkg.tar.zst";
sha256 = "01l23cn5brficjzba7ldscqkdvk4rdcvvdyybd90qr2hqzligmhn";
name = "mingw-w64-clang-x86_64-libssh2-1.11.1-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-libssh2-1.11.1-2-any.pkg.tar.zst";
sha256 = "066808p483nhivnd02czs9aqd24arcggvgxwg79hg2kax4wdmav5";
name = "mingw-w64-clang-x86_64-libssh2-1.11.1-2-any.pkg.tar.zst";
})
(pkgs.fetchurl {
@@ -138,9 +138,9 @@
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-libgit2-1.9.2-1-any.pkg.tar.zst";
sha256 = "1p3ay09vmgd8yi60bdrix7vad97f2cdmvm23ww8rkx7z6jwz5mcc";
name = "mingw-w64-clang-x86_64-libgit2-1.9.2-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-libgit2-1.9.2-2-any.pkg.tar.zst";
sha256 = "031f7a6gyvc8gfmac83fd3xnhw20vjbigbkd8haj0d9mvxgs8c7z";
name = "mingw-w64-clang-x86_64-libgit2-1.9.2-2-any.pkg.tar.zst";
})
(pkgs.fetchurl {
@@ -162,9 +162,9 @@
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-rust-1.92.0-1-any.pkg.tar.zst";
sha256 = "00zhs6fcr8ipin2kmdpihnlc48kr3nnaq4pnz3m0rdvbild4jk6x";
name = "mingw-w64-clang-x86_64-rust-1.92.0-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-rust-1.93.0-1-any.pkg.tar.zst";
sha256 = "1ys5v2wxxfwi25wqz4023nb4brcxlhkld33drrxdd4hirm6g1kk7";
name = "mingw-w64-clang-x86_64-rust-1.93.0-1-any.pkg.tar.zst";
})
(pkgs.fetchurl {
@@ -186,9 +186,9 @@
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-gettext-runtime-0.26-2-any.pkg.tar.zst";
sha256 = "1y925rmy9d1c1ywi16gbq194jfnzxi5zrb67ssfq03hrcyq1d20i";
name = "mingw-w64-clang-x86_64-gettext-runtime-0.26-2-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-gettext-runtime-1.0-1-any.pkg.tar.zst";
sha256 = "145vd12i2i85km425pkqlqfnjl1w794wkfl9haf9sv414x3sc8kg";
name = "mingw-w64-clang-x86_64-gettext-runtime-1.0-1-any.pkg.tar.zst";
})
(pkgs.fetchurl {
@@ -216,9 +216,9 @@
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-p11-kit-0.25.10-1-any.pkg.tar.zst";
sha256 = "1vwlyv5c52hmc2madb8rw0s30msncymawh2vgaiy648x7dsfbwi6";
name = "mingw-w64-clang-x86_64-p11-kit-0.25.10-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-p11-kit-0.26.2-1-any.pkg.tar.zst";
sha256 = "02s8yszqm80m2nfnb5vil42adahifr71my8d8npz1p7i03wbi4ar";
name = "mingw-w64-clang-x86_64-p11-kit-0.26.2-1-any.pkg.tar.zst";
})
(pkgs.fetchurl {
@@ -246,33 +246,33 @@
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-gnutls-3.8.11-1-any.pkg.tar.zst";
sha256 = "0wvkri2nh5d7iin8j1a06w1jmxq7cdjla1bdgcv6w1xnyblk35qg";
name = "mingw-w64-clang-x86_64-gnutls-3.8.11-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-gnutls-3.8.12-1-any.pkg.tar.zst";
sha256 = "091iskkh1vq8j3sy7dibxj6pq9nck0yl1n02jsakk2mmn6d15xaj";
name = "mingw-w64-clang-x86_64-gnutls-3.8.12-1-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-ngtcp2-1.19.0-1-any.pkg.tar.zst";
sha256 = "1j97hlbmakg33v2dd3cfv0jb9xins1alc1av4ysyllzrfbrc807n";
name = "mingw-w64-clang-x86_64-ngtcp2-1.19.0-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-ngtcp2-1.20.0-3-any.pkg.tar.zst";
sha256 = "1b0jxdzw4znsnx0r9vfqg2r831xpir3m62wr73zps1p1xj0lfdy0";
name = "mingw-w64-clang-x86_64-ngtcp2-1.20.0-3-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-nghttp3-1.14.0-1-any.pkg.tar.zst";
sha256 = "04widfkq5js0fp1w52fvxx0h2s7fzyd6jskihi2gxmsmh7rq6bxg";
name = "mingw-w64-clang-x86_64-nghttp3-1.14.0-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-nghttp3-1.15.0-1-any.pkg.tar.zst";
sha256 = "0vdi14dvkpx196ib6jir3lglgrjn0kz4hdjf8myjmw1czljw9cfn";
name = "mingw-w64-clang-x86_64-nghttp3-1.15.0-1-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-curl-8.18.0-1-any.pkg.tar.zst";
sha256 = "1nbyinmn78hv4nn9ikkhsi3lsjlmb09q8nh9gw1g625j2f2xs3iz";
name = "mingw-w64-clang-x86_64-curl-8.18.0-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-curl-8.18.0-4-any.pkg.tar.zst";
sha256 = "07d1ssnna6h2zp3ghsvyw286sixlrd4i646lw7nh059g5x2wv5sz";
name = "mingw-w64-clang-x86_64-curl-8.18.0-4-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-expat-2.7.3-1-any.pkg.tar.zst";
sha256 = "04sp1xlv9hx39zhh5i557frmifgkk1lwx333iwbn33f061kmfz3h";
name = "mingw-w64-clang-x86_64-expat-2.7.3-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-expat-2.7.4-1-any.pkg.tar.zst";
sha256 = "157lvqvd0f9998i422bm2401liqcgvbll9q4q5hh5l5zd1cbw1km";
name = "mingw-w64-clang-x86_64-expat-2.7.4-1-any.pkg.tar.zst";
})
(pkgs.fetchurl {
@@ -312,9 +312,9 @@
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-libarchive-3.8.5-1-any.pkg.tar.zst";
sha256 = "0r6ybbcnzqf8pcpf6wymfgpbm27ck0cpkmklali0y9fvqjvcijsa";
name = "mingw-w64-clang-x86_64-libarchive-3.8.5-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-libarchive-3.8.5-2-any.pkg.tar.zst";
sha256 = "1b8ihbccfhj4by58mr7m4gfb6j77wi0gd0wwiws5cf62rssnnhjl";
name = "mingw-w64-clang-x86_64-libarchive-3.8.5-2-any.pkg.tar.zst";
})
(pkgs.fetchurl {
@@ -342,9 +342,9 @@
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-cmake-4.2.1-1-any.pkg.tar.zst";
sha256 = "1qjs42kilam7gkry6wmxmi9z5cdsc76m8jbb8bg11ynxbm5v5zpx";
name = "mingw-w64-clang-x86_64-cmake-4.2.1-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-cmake-4.2.3-1-any.pkg.tar.zst";
sha256 = "0kfjh2aqyxpn2h9frjvg8avj0ggjmfwxxivw7jz09n7256x4hs45";
name = "mingw-w64-clang-x86_64-cmake-4.2.3-1-any.pkg.tar.zst";
})
(pkgs.fetchurl {
@@ -378,15 +378,15 @@
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-python-3.13.11-4-any.pkg.tar.zst";
sha256 = "037a7k1z9vfmab7s4kd27vx4c7iwlz7xry68yl828ghyik5s3k9c";
name = "mingw-w64-clang-x86_64-python-3.13.11-4-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-python-3.14.3-1-any.pkg.tar.zst";
sha256 = "1a7bj0dcq6mkshlf6v85n0n4xfyswk206cfniiv284vbl7yzv3va";
name = "mingw-w64-clang-x86_64-python-3.14.3-1-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-llvm-openmp-21.1.8-1-any.pkg.tar.zst";
sha256 = "18vv4j9l3wnxvfixaszsfc5cdnnfx4b9a5ckhj3q7z9rz08cwhc4";
name = "mingw-w64-clang-x86_64-llvm-openmp-21.1.8-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-llvm-openmp-21.1.8-2-any.pkg.tar.zst";
sha256 = "0svn7khdj36f0nvnnzpy96476c6nm8cg92hkvnyl9rdacrv9a52g";
name = "mingw-w64-clang-x86_64-llvm-openmp-21.1.8-2-any.pkg.tar.zst";
})
(pkgs.fetchurl {
@@ -396,14 +396,14 @@
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-python-numpy-2.4.1-1-any.pkg.tar.zst";
sha256 = "0r72ir1sxihskrd6rncqbvy2h7a9yz1hcslc41wakip5s82jar34";
name = "mingw-w64-clang-x86_64-python-numpy-2.4.1-1-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-python-numpy-2.4.1-2-any.pkg.tar.zst";
sha256 = "0860glzjn6g4xnfwgbhciidysn1p50rksm3n2dv7lvjnndnkn1l3";
name = "mingw-w64-clang-x86_64-python-numpy-2.4.1-2-any.pkg.tar.zst";
})
(pkgs.fetchurl {
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-python-setuptools-80.9.0-6-any.pkg.tar.zst";
sha256 = "01an804lybsjir3adippishm8sya6fbp9di5qdxwpwf52xg70zgc";
name = "mingw-w64-clang-x86_64-python-setuptools-80.9.0-6-any.pkg.tar.zst";
url = "https://mirror.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-python-setuptools-81.0.0-1-any.pkg.tar.zst";
sha256 = "1f7bwgnnqn6p9i2kj7ldl2wz1d4wx163iskrlsfpjfr84anh38lg";
name = "mingw-w64-clang-x86_64-python-setuptools-81.0.0-1-any.pkg.tar.zst";
})
]