)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"eb7482469a46e653b6d281dba3b372e0b6392261","unresolved":true,"context_lines":[{"line_number":12,"context_line":"using `env!()`."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The resulting value needs to be massaged a bit, since it is an \"LLVM"},{"line_number":15,"context_line":"triple\".  The current code should work for the four \"supported\""},{"line_number":16,"context_line":"nixpkgs platforms: linux/darwin on x86_64/aarch64."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Signed-off-by: Adam Joseph \u003cadam@westernsemico.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5874eacb_2cc75cef","line":15,"updated":"2022-10-12 11:16:46.000000000","message":"Nixpkgs has substantially more than four supported platforms!  The platforms you\u0027ve listed are just the platforms Hydra builds for.  The actual \"supported\" platforms are the ones listed in lib.systems.doubles, but of course the degree to which they are supported varies.\n\nBut the relevant \"support\" here is the platforms Nix produces sensible doubles for, I think, and that\u0027s really only linux, darwin, and netbsd, because what to do about platforms like OpenBSD with very unstable, versioned ABIs is still unclear.  (We\u0027ll have to look into this soon as part of John\u0027s work on FreeBSD enablement.)","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"8bc1221299365d3d3f690f754a3a33f0716a357d","unresolved":false,"context_lines":[{"line_number":12,"context_line":"using `env!()`."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The resulting value needs to be massaged a bit, since it is an \"LLVM"},{"line_number":15,"context_line":"triple\".  The current code should work for the four \"supported\""},{"line_number":16,"context_line":"nixpkgs platforms: linux/darwin on x86_64/aarch64."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Signed-off-by: Adam Joseph \u003cadam@westernsemico.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"355bcee5_1cfc229c","line":15,"in_reply_to":"5874eacb_2cc75cef","updated":"2022-10-13 04:11:18.000000000","message":"I didn\u0027t know Ericson2314 was working on bootstrapping nixpkgs on FreeBSD.  That is way cool.\n\nI\u0027ve updated the commit message (see patchset 3).","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"1bfd356c723cd4157ad4fd608bad2e967bc2d6b5","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"b59ca5b9_f6115c2c","updated":"2022-10-12 18:43:46.000000000","message":"Note to self: replicate special handling of `i*86` and `armv[67]` from cppnix here:\n\nhttps://github.com/NixOS/nix/blob/a6239eb5700ebb85b47bb5f12366404448361f8d/configure.ac#L20","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"8bc1221299365d3d3f690f754a3a33f0716a357d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"b5db2288_97fb5b59","updated":"2022-10-13 04:11:18.000000000","message":"Okay, patchset 3 is not perfect, but it\u0027s an improvement over patchset 2...","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"d0f4b66699283b4d1f4ef7ff301fd71818a1e89b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"ebce0665_0946acbb","in_reply_to":"b59ca5b9_f6115c2c","updated":"2022-10-13 04:13:21.000000000","message":"Done","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"d7df313077a0ab852efb8a2024d1e451f8a1e347","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4e3b4209_8ee45966","updated":"2022-10-13 04:16:20.000000000","message":"qyliss, I added two additional test cases for mips64[el]-linux-gnuabin32.\n\ncppnix currently cannot detect this platform, but it does work if you pass `--option system`.","commit_id":"f678aef53fd21d57e41deb73fda7609adfad0f62"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"dcfa3fb75179804f72071481259249c6f071a527","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"ffc720af_19c85176","updated":"2022-10-13 19:17:53.000000000","message":"Looking great.  There are some platforms where I think we need to check we\u0027re matching the C++ Nix (GNU) behaviour, but not too many.","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"2c6c9f9efef9f39b3c9a15aa35fcf5c0978a65fc","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"c0459ff7_f7d39988","updated":"2022-10-18 10:05:56.000000000","message":"I have to admit I have kinda lost my motivation for this PR.  @qyliss, are you by any chance interested in taking over?  You put a lot of effort into compiling that list; at this point the PR is really more your work than it is mine.\n\nI really have no strong opinions -- or for that matter any opinions at all -- about the routine that nix uses to infer its kooky doubles.\n\nNix doubles are fundamentally lossy and lack essential information.  Frankly I think nixpkgs should work gradually toward eliminating any use of them.  And in fact, on mips64 nixpkgs doesn\u0027t use them at all -- because it can\u0027t.  Nix doubles are ambiguous on mips64, so I haven\u0027t submitted the PR to make use of `builtins.currentSystem` on that platform, and I never will.\n\nTo summarize: I find it hard to muster any motivation to improve anything related to nix doubles beyond the bare minimum needed to make tests pass and (someday) have nixpkgs not barf.  I would be quite happy if you would take over dealing with this.","commit_id":"f8d262004e0977ce4481fbc7484dcae6dd51ab41"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"2224fcc0a8f3c049ad37e3ae4334edb0cbe79d84","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"6b977db0_566973a0","updated":"2022-10-14 08:41:43.000000000","message":"I\u0027m not an expert on the system tuples, but to me this looks good at this point and qyliss said on IRC yesterday it\u0027s likely \"good enough\", so LGTM!","commit_id":"f8d262004e0977ce4481fbc7484dcae6dd51ab41"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"685be5d01abd33853ebfe702f111c8cc2792baae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"89c79283_bd97871a","updated":"2022-10-13 20:22:08.000000000","message":"I\u0027ve unresolved a few of these, all for the same reason I explain in my first comment.","commit_id":"f8d262004e0977ce4481fbc7484dcae6dd51ab41"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"ad9e790dd0006599fa40d1b43d9d39679087a966","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"ef12c96c_7bd880cb","in_reply_to":"c0459ff7_f7d39988","updated":"2022-10-24 12:18:08.000000000","message":"I\u0027m adopting this, thanks for the work you put into it so far!","commit_id":"f8d262004e0977ce4481fbc7484dcae6dd51ab41"}],"tvix/eval/build.rs":[{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"79e8672e22597dd6c3d96aa07dffa7910cf129a5","unresolved":true,"context_lines":[{"line_number":3,"context_line":"fn main() {"},{"line_number":4,"context_line":"    println!("},{"line_number":5,"context_line":"        \"cargo:rustc-env\u003dTVIX_CURRENT_SYSTEM\u003d{}\","},{"line_number":6,"context_line":"        \u0026env::var(\"TARGET\").unwrap()"},{"line_number":7,"context_line":"    );"},{"line_number":8,"context_line":"    println!(\"cargo:rerun-if-changed-env\u003dTARGET\")"},{"line_number":9,"context_line":"}"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"88e52334_ea021de0","line":6,"range":{"start_line":6,"start_character":19,"end_line":6,"end_character":25},"updated":"2022-10-12 11:31:39.000000000","message":"Does LLVM/cargo/rustc [normalize](https://llvm.org/doxygen/classllvm_1_1Triple.html#a17b5b7102b637681083b66c660d2f7d1) the triple before setting `TARGET`?","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"68672ce5c895af6a64184a81fdf2e74de6d688d0","unresolved":false,"context_lines":[{"line_number":3,"context_line":"fn main() {"},{"line_number":4,"context_line":"    println!("},{"line_number":5,"context_line":"        \"cargo:rustc-env\u003dTVIX_CURRENT_SYSTEM\u003d{}\","},{"line_number":6,"context_line":"        \u0026env::var(\"TARGET\").unwrap()"},{"line_number":7,"context_line":"    );"},{"line_number":8,"context_line":"    println!(\"cargo:rerun-if-changed-env\u003dTARGET\")"},{"line_number":9,"context_line":"}"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"ba7891aa_abd10312","line":6,"range":{"start_line":6,"start_character":19,"end_line":6,"end_character":25},"in_reply_to":"6a4655ee_fa608e0f","updated":"2022-10-13 18:23:00.000000000","message":"Yes, it does: https://github.com/rust-lang/rust/blob/6b3ede3f7bc502eba7bbd202b4b9312d812adcd7/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp#L391","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"b9faf3aac8cdad4143f7053713e33efb9282e140","unresolved":true,"context_lines":[{"line_number":3,"context_line":"fn main() {"},{"line_number":4,"context_line":"    println!("},{"line_number":5,"context_line":"        \"cargo:rustc-env\u003dTVIX_CURRENT_SYSTEM\u003d{}\","},{"line_number":6,"context_line":"        \u0026env::var(\"TARGET\").unwrap()"},{"line_number":7,"context_line":"    );"},{"line_number":8,"context_line":"    println!(\"cargo:rerun-if-changed-env\u003dTARGET\")"},{"line_number":9,"context_line":"}"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"6a4655ee_fa608e0f","line":6,"range":{"start_line":6,"start_character":19,"end_line":6,"end_character":25},"in_reply_to":"88e52334_ea021de0","updated":"2022-10-13 04:13:42.000000000","message":"I don\u0027t know.","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"}],"tvix/eval/src/builtins/mod.rs":[{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"79e8672e22597dd6c3d96aa07dffa7910cf129a5","unresolved":true,"context_lines":[{"line_number":506,"context_line":"    );"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"    let parts: Vec\u003c\u0026str\u003e \u003d CURRENT_PLATFORM.split(\u0027-\u0027).collect();"},{"line_number":509,"context_line":"    let cpu \u003d parts[0];"},{"line_number":510,"context_line":"    let os \u003d match parts[1..] {"},{"line_number":511,"context_line":"        [_vendor, \"linux\", _libcabi] \u003d\u003e \"linux\","},{"line_number":512,"context_line":"        [\"linux\", _libcabi] \u003d\u003e \"linux\","}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"5e90693e_479fe292","line":509,"updated":"2022-10-12 11:31:39.000000000","message":"I think LLVM returns `x86` for i*86, so we\u0027d need to map this to `i686` which Nix expects (for all variants of the 32bit x86 architectures).","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"846d83a9837c71b01b15b2c349af8993275fa080","unresolved":true,"context_lines":[{"line_number":506,"context_line":"    );"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"    let parts: Vec\u003c\u0026str\u003e \u003d CURRENT_PLATFORM.split(\u0027-\u0027).collect();"},{"line_number":509,"context_line":"    let cpu \u003d parts[0];"},{"line_number":510,"context_line":"    let os \u003d match parts[1..] {"},{"line_number":511,"context_line":"        [_vendor, \"linux\", _libcabi] \u003d\u003e \"linux\","},{"line_number":512,"context_line":"        [\"linux\", _libcabi] \u003d\u003e \"linux\","}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"86dc6d05_1943b2b7","line":509,"in_reply_to":"42778183_158fc9d4","updated":"2022-10-12 11:33:29.000000000","message":"Similarly `armv6` and `armv7` get mapped to `armv6l` and `armv7l` etc.","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"8508f17698c4646a02a5ad7e19e0e5b4eaa4a69e","unresolved":true,"context_lines":[{"line_number":506,"context_line":"    );"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"    let parts: Vec\u003c\u0026str\u003e \u003d CURRENT_PLATFORM.split(\u0027-\u0027).collect();"},{"line_number":509,"context_line":"    let cpu \u003d parts[0];"},{"line_number":510,"context_line":"    let os \u003d match parts[1..] {"},{"line_number":511,"context_line":"        [_vendor, \"linux\", _libcabi] \u003d\u003e \"linux\","},{"line_number":512,"context_line":"        [\"linux\", _libcabi] \u003d\u003e \"linux\","}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"42778183_158fc9d4","line":509,"in_reply_to":"5e90693e_479fe292","updated":"2022-10-12 11:32:51.000000000","message":"Judging from the list qyliss posted, it seems it would be `i*86`. We need to map that to `i686` like [Nix does](https://github.com/NixOS/nix/blob/f3193edd87be915910f0ae239b058713ef685c74/configure.ac#L15-L16) (for better or worse).","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"8bc1221299365d3d3f690f754a3a33f0716a357d","unresolved":false,"context_lines":[{"line_number":506,"context_line":"    );"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"    let parts: Vec\u003c\u0026str\u003e \u003d CURRENT_PLATFORM.split(\u0027-\u0027).collect();"},{"line_number":509,"context_line":"    let cpu \u003d parts[0];"},{"line_number":510,"context_line":"    let os \u003d match parts[1..] {"},{"line_number":511,"context_line":"        [_vendor, \"linux\", _libcabi] \u003d\u003e \"linux\","},{"line_number":512,"context_line":"        [\"linux\", _libcabi] \u003d\u003e \"linux\","}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"6e4fdf64_a8bd53bf","line":509,"in_reply_to":"86dc6d05_1943b2b7","updated":"2022-10-13 04:11:18.000000000","message":"Done","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"79e8672e22597dd6c3d96aa07dffa7910cf129a5","unresolved":true,"context_lines":[{"line_number":508,"context_line":"    let parts: Vec\u003c\u0026str\u003e \u003d CURRENT_PLATFORM.split(\u0027-\u0027).collect();"},{"line_number":509,"context_line":"    let cpu \u003d parts[0];"},{"line_number":510,"context_line":"    let os \u003d match parts[1..] {"},{"line_number":511,"context_line":"        [_vendor, \"linux\", _libcabi] \u003d\u003e \"linux\","},{"line_number":512,"context_line":"        [\"linux\", _libcabi] \u003d\u003e \"linux\","},{"line_number":513,"context_line":"        [_vendor, \"darwin\"] \u003d\u003e \"darwin\","},{"line_number":514,"context_line":"        _ \u003d\u003e panic!(\"unrecognized host triple {CURRENT_PLATFORM}\"),"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"025ef2fc_bea33a15","line":511,"range":{"start_line":511,"start_character":27,"end_line":511,"end_character":35},"updated":"2022-10-12 11:31:39.000000000","message":"FTR LLVM calls this “environment“.","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"8bc1221299365d3d3f690f754a3a33f0716a357d","unresolved":false,"context_lines":[{"line_number":508,"context_line":"    let parts: Vec\u003c\u0026str\u003e \u003d CURRENT_PLATFORM.split(\u0027-\u0027).collect();"},{"line_number":509,"context_line":"    let cpu \u003d parts[0];"},{"line_number":510,"context_line":"    let os \u003d match parts[1..] {"},{"line_number":511,"context_line":"        [_vendor, \"linux\", _libcabi] \u003d\u003e \"linux\","},{"line_number":512,"context_line":"        [\"linux\", _libcabi] \u003d\u003e \"linux\","},{"line_number":513,"context_line":"        [_vendor, \"darwin\"] \u003d\u003e \"darwin\","},{"line_number":514,"context_line":"        _ \u003d\u003e panic!(\"unrecognized host triple {CURRENT_PLATFORM}\"),"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"5cbd051e_6f30d02c","line":511,"range":{"start_line":511,"start_character":27,"end_line":511,"end_character":35},"in_reply_to":"025ef2fc_bea33a15","updated":"2022-10-13 04:11:18.000000000","message":"Done","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"eb7482469a46e653b6d281dba3b372e0b6392261","unresolved":true,"context_lines":[{"line_number":513,"context_line":"        [_vendor, \"darwin\"] \u003d\u003e \"darwin\","},{"line_number":514,"context_line":"        _ \u003d\u003e panic!(\"unrecognized host triple {CURRENT_PLATFORM}\"),"},{"line_number":515,"context_line":"    };"},{"line_number":516,"context_line":"    let current_platform \u003d format!(\"{cpu}-{os}\");"},{"line_number":517,"context_line":"    map.insert(\"currentSystem\".into(), current_platform.into());"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"    let mut add_builtins \u003d |builtins: Vec\u003cBuiltin\u003e| {"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"a7a0739d_e8800bbf","line":516,"updated":"2022-10-12 11:16:46.000000000","message":"I\u0027d like to see this factored out into a (ideally const) function that takes an LLVM triple and returns a Nix double.  That way, you could add unit tests and ensure it gives the right answer for all platforms we currently know about.  (I\u0027d do every architecture supported by Rust, for Linux, NetBSD, and Darwin as applicable.)","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"8befe1f7578d4c8938559ca51bd47081c12fcefd","unresolved":true,"context_lines":[{"line_number":513,"context_line":"        [_vendor, \"darwin\"] \u003d\u003e \"darwin\","},{"line_number":514,"context_line":"        _ \u003d\u003e panic!(\"unrecognized host triple {CURRENT_PLATFORM}\"),"},{"line_number":515,"context_line":"    };"},{"line_number":516,"context_line":"    let current_platform \u003d format!(\"{cpu}-{os}\");"},{"line_number":517,"context_line":"    map.insert(\"currentSystem\".into(), current_platform.into());"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"    let mut add_builtins \u003d |builtins: Vec\u003cBuiltin\u003e| {"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"afe0cf0f_f7fa11e7","line":516,"in_reply_to":"1d54a80f_d1c3a817","updated":"2022-10-13 03:33:27.000000000","message":"\u003e I\u0027ve just gone through the list of supported Rust platforms\n\nGerrit needs the Github\u0027s \"reacts with heart\" button.\n\nSo far that is the only thing I\u0027ve found that I like better about github. 😊","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"68672ce5c895af6a64184a81fdf2e74de6d688d0","unresolved":false,"context_lines":[{"line_number":513,"context_line":"        [_vendor, \"darwin\"] \u003d\u003e \"darwin\","},{"line_number":514,"context_line":"        _ \u003d\u003e panic!(\"unrecognized host triple {CURRENT_PLATFORM}\"),"},{"line_number":515,"context_line":"    };"},{"line_number":516,"context_line":"    let current_platform \u003d format!(\"{cpu}-{os}\");"},{"line_number":517,"context_line":"    map.insert(\"currentSystem\".into(), current_platform.into());"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"    let mut add_builtins \u003d |builtins: Vec\u003cBuiltin\u003e| {"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"747cfe4e_f8b4ebb5","line":516,"in_reply_to":"355d278b_08e06465","updated":"2022-10-13 18:23:00.000000000","message":"I don\u0027t think we\u0027re going to get access to the proper triple-handling routines by way of `cargo` -- `cargo`\u0027s source code is full of stuff like `target_triple.ends_with(\"-windows-msvc\")`.  The cargo source code doesn\u0027t even reference LLVM\u0027s `Triple.h`, so I don\u0027t think it uses the proper parsing APIs.\n\nrustc does reference `Triple.h`, but only once, and doesn\u0027t seem to expose much via environment variables.\n\nI poked around the LLVM CLI and didn\u0027t find anything useful, but it still might be there, just buried in a non-obvious place.  If it isn\u0027t hidden in there somewhere I think our only other option will be to add a dependency.  There are rust crates for this; is it worth adding a build-time crate dependency?","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"b103bcbedaa1c6419a64a2510328371cf61185fd","unresolved":true,"context_lines":[{"line_number":513,"context_line":"        [_vendor, \"darwin\"] \u003d\u003e \"darwin\","},{"line_number":514,"context_line":"        _ \u003d\u003e panic!(\"unrecognized host triple {CURRENT_PLATFORM}\"),"},{"line_number":515,"context_line":"    };"},{"line_number":516,"context_line":"    let current_platform \u003d format!(\"{cpu}-{os}\");"},{"line_number":517,"context_line":"    map.insert(\"currentSystem\".into(), current_platform.into());"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"    let mut add_builtins \u003d |builtins: Vec\u003cBuiltin\u003e| {"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"3bf2337c_bdd1581a","line":516,"in_reply_to":"a7a0739d_e8800bbf","updated":"2022-10-12 11:28:08.000000000","message":"I\u0027ve just gone through the list of supported Rust platforms, and I think this is the complete set of triples it would make sense to test, as things stand with Nix.  It\u0027s a long list, but these are just test cases — I don\u0027t expect your implementation to become significantly more complicated, although there are a few things that\u0027ll need to be done, e.g. implementing normalisation of 32-bit x86 architectures to \"i686\" like Nix does.\n\naarch64-unknown-linux-gnu\ni686-unknown-linux-gnu\nx86_64-apple-darwin\nx86_64-unknown-linux-gnu\naarch64-apple-darwin\naarch64-unknown-linux-musl\narm-unknown-linux-gnueabi\narm-unknown-linux-gnueabihf\narmv7-unknown-linux-gnueabihf\nmips-unknown-linux-gnu\nmips64-unknown-linux-gnuabi64\nmips64el-unknown-linux-gnuabi64\nmipsel-unknown-linux-gnu\npowerpc-unknown-linux-gnu\npowerpc64-unknown-linux-gnu\npowerpc64le-unknown-linux-gnu\nriscv64gc-unknown-linux-gnu\ns390x-unknown-linux-gnu\nx86_64-unknown-linux-musl\nx86_64-unknown-netbsd\naarch64-linux-android\narm-linux-androideabi\narm-unknown-linux-musleabi\narm-unknown-linux-musleabihf\narmv5te-unknown-linux-gnueabi\narmv5te-unknown-linux-musleabi\narmv7-linux-androideabi\narmv7-unknown-linux-gnueabi\narmv7-unknown-linux-musleabi\narmv7-unknown-linux-musleabihf\ni586-unknown-linux-gnu\ni586-unknown-linux-musl\ni686-linux-android\ni686-unknown-linux-musl\nmips-unknown-linux-musl\nmips64-unknown-linux-muslabi64\nmips64el-unknown-linux-muslabi64\nmipsel-unknown-linux-musl\nsparc64-unknown-linux-gnu\nthumbv7neon-linux-androideabi\nthumbv7neon-unknown-linux-gnueabihf\nx86_64-linux-android\nx86_64-unknown-linux-gnux32\naarch64-unknown-linux-gnu_ilp32\naarch64-unknown-netbsd\naarch64_be-unknown-linux-gnu_ilp32\naarch64_be-unknown-linux-gnu\narmeb-unknown-linux-gnueabi\narmv4t-unknown-linux-gnueabi\narmv6-unknown-netbsd-eabihf\narmv7-unknown-linux-uclibceabi\narmv7-unknown-linux-uclibceabihf\narmv7-unknown-netbsd-eabihf\nhexagon-unknown-linux-musl\ni686-unknown-netbsd\nm68k-unknown-linux-gnu\nmips-unknown-linux-uclibc\nmips64-openwrt-linux-musl\nmipsel-unknown-linux-uclibc\nmipsisa32r6-unknown-linux-gnu\nmipsisa32r6el-unknown-linux-gnu\nmipsisa64r6-unknown-linux-gnuabi64\nmipsisa64r6el-unknown-linux-gnuabi64\npowerpc-unknown-linux-gnuspe\npowerpc-unknown-linux-musl\npowerpc-unknown-netbsd\npowerpc64-unknown-linux-musl\npowerpc64le-unknown-linux-musl\nriscv32gc-unknown-linux-gnu\nriscv32gc-unknown-linux-musl\nriscv64gc-unknown-linux-musl\ns390x-unknown-linux-musl\nsparc-unknown-linux-gnu\nsparc64-unknown-netbsd\nthumbv7neon-unknown-linux-musleabihf","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"79e8672e22597dd6c3d96aa07dffa7910cf129a5","unresolved":true,"context_lines":[{"line_number":513,"context_line":"        [_vendor, \"darwin\"] \u003d\u003e \"darwin\","},{"line_number":514,"context_line":"        _ \u003d\u003e panic!(\"unrecognized host triple {CURRENT_PLATFORM}\"),"},{"line_number":515,"context_line":"    };"},{"line_number":516,"context_line":"    let current_platform \u003d format!(\"{cpu}-{os}\");"},{"line_number":517,"context_line":"    map.insert(\"currentSystem\".into(), current_platform.into());"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"    let mut add_builtins \u003d |builtins: Vec\u003cBuiltin\u003e| {"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"1d54a80f_d1c3a817","line":516,"in_reply_to":"a7a0739d_e8800bbf","updated":"2022-10-12 11:31:39.000000000","message":"That would be a good improvement. What it\u0027d be really nice if we could reuse the `LLVM::Triple` API somehow, but it would complicate building Tvix – the C API available via `llvm-sys` doesn\u0027t allow accessing it in a nice way anyways.\n\nWe should check if there is some LLVM CLI tool which helps us a bit, otherwise we\u0027ll just need to do string manipulation ourselves which is fine if `TARGET` gets normalized before we see it.","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"8bc1221299365d3d3f690f754a3a33f0716a357d","unresolved":false,"context_lines":[{"line_number":513,"context_line":"        [_vendor, \"darwin\"] \u003d\u003e \"darwin\","},{"line_number":514,"context_line":"        _ \u003d\u003e panic!(\"unrecognized host triple {CURRENT_PLATFORM}\"),"},{"line_number":515,"context_line":"    };"},{"line_number":516,"context_line":"    let current_platform \u003d format!(\"{cpu}-{os}\");"},{"line_number":517,"context_line":"    map.insert(\"currentSystem\".into(), current_platform.into());"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"    let mut add_builtins \u003d |builtins: Vec\u003cBuiltin\u003e| {"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"355d278b_08e06465","line":516,"in_reply_to":"afe0cf0f_f7fa11e7","updated":"2022-10-13 04:11:18.000000000","message":"hrm, gerrit seems to only let me mark entire threads as resolved.  patchset 3 addresses qyliss\u0027 comment (or at least tries to), so I\u0027m marking this resolved.\n\nSterni, I agree, if we could find some way to have a *build-time* dependency on the proper LLVM triple parser that would be great.","commit_id":"1811a8b94390e53b195d97fdd849787d577b78b0"}],"tvix/eval/src/systems.rs":[{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"dcfa3fb75179804f72071481259249c6f071a527","unresolved":true,"context_lines":[{"line_number":16,"context_line":"    let cpu \u003d match parts[0] {"},{"line_number":17,"context_line":"        \"armv6\" \u003d\u003e \"armv6l\", // cppnix appends an \"l\" to armv6"},{"line_number":18,"context_line":"        \"armv7\" \u003d\u003e \"armv7l\", // cppnix appends an \"l\" to armv7"},{"line_number":19,"context_line":"        \"x86\" \u003d\u003e \"i686\",     // cppnix calls all IA-32 cpu\u0027s \"i686\""},{"line_number":20,"context_line":"        x \u003d\u003e match x.as_bytes().as_ref() {"},{"line_number":21,"context_line":"            [b\u0027i\u0027, _, b\u00278\u0027, b\u00276\u0027] \u003d\u003e \"i686\", // cppnix glob-matches against i*86"},{"line_number":22,"context_line":"            _ \u003d\u003e x,"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"31736bc9_e5fe76ff","line":19,"updated":"2022-10-13 19:17:53.000000000","message":"What triple is this case for?","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"10c2427a2df0a6aa778c9e81fa62eeeee1c92b6b","unresolved":false,"context_lines":[{"line_number":16,"context_line":"    let cpu \u003d match parts[0] {"},{"line_number":17,"context_line":"        \"armv6\" \u003d\u003e \"armv6l\", // cppnix appends an \"l\" to armv6"},{"line_number":18,"context_line":"        \"armv7\" \u003d\u003e \"armv7l\", // cppnix appends an \"l\" to armv7"},{"line_number":19,"context_line":"        \"x86\" \u003d\u003e \"i686\",     // cppnix calls all IA-32 cpu\u0027s \"i686\""},{"line_number":20,"context_line":"        x \u003d\u003e match x.as_bytes().as_ref() {"},{"line_number":21,"context_line":"            [b\u0027i\u0027, _, b\u00278\u0027, b\u00276\u0027] \u003d\u003e \"i686\", // cppnix glob-matches against i*86"},{"line_number":22,"context_line":"            _ \u003d\u003e x,"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"65a5cb5f_c2a4a55c","line":19,"in_reply_to":"31736bc9_e5fe76ff","updated":"2022-10-13 19:32:39.000000000","message":"How embarrassing, for some reason I thought cppnix had that.","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"dcfa3fb75179804f72071481259249c6f071a527","unresolved":true,"context_lines":[{"line_number":26,"context_line":"        [_vendor, kernel, _environment] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":27,"context_line":"        [_vendor, kernel] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":28,"context_line":"        [kernel, _environment] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":29,"context_line":"        _ \u003d\u003e panic!(\"unrecognized host triple {llvm_triple}\"),"},{"line_number":30,"context_line":"    };"},{"line_number":31,"context_line":"    format!(\"{cpu}-{os}\")"},{"line_number":32,"context_line":"}"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"ee11cc1a_f84350ad","line":29,"updated":"2022-10-13 19:17:53.000000000","message":"Should this say target instead of host, to be consistent with Rust/LLVM naming?","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"10c2427a2df0a6aa778c9e81fa62eeeee1c92b6b","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        [_vendor, kernel, _environment] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":27,"context_line":"        [_vendor, kernel] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":28,"context_line":"        [kernel, _environment] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":29,"context_line":"        _ \u003d\u003e panic!(\"unrecognized host triple {llvm_triple}\"),"},{"line_number":30,"context_line":"    };"},{"line_number":31,"context_line":"    format!(\"{cpu}-{os}\")"},{"line_number":32,"context_line":"}"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"f7ab8f53_f3200ff9","line":29,"in_reply_to":"ee11cc1a_f84350ad","updated":"2022-10-13 19:32:39.000000000","message":"This is actually a tricky question.\n\nRight now `llvm_triple_to_nix_double` executes at `tvix`-runtime, since it isn\u0027t `const` (since it allocates memory), and `tvix` doesn\u0027t have a notion of a target platform.\n\nI\u0027ll just remove the word `host`.","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"dcfa3fb75179804f72071481259249c6f071a527","unresolved":true,"context_lines":[{"line_number":62,"context_line":"        );"},{"line_number":63,"context_line":"        assert_eq!("},{"line_number":64,"context_line":"            llvm_triple_to_nix_double(\"arm-unknown-linux-gnueabi\"),"},{"line_number":65,"context_line":"            \"arm-linux\""},{"line_number":66,"context_line":"        );"},{"line_number":67,"context_line":"        assert_eq!("},{"line_number":68,"context_line":"            llvm_triple_to_nix_double(\"arm-unknown-linux-gnueabihf\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"603c7752_e5b4f7d2","line":65,"updated":"2022-10-13 19:17:53.000000000","message":"This is armv6 according to the Rust documentation, and I suspect GNU (and therefore C++ Nix) would call it that rather than just \"arm\", although I haven\u0027t run config.guess on an armv6 system to check…","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"10c2427a2df0a6aa778c9e81fa62eeeee1c92b6b","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        );"},{"line_number":63,"context_line":"        assert_eq!("},{"line_number":64,"context_line":"            llvm_triple_to_nix_double(\"arm-unknown-linux-gnueabi\"),"},{"line_number":65,"context_line":"            \"arm-linux\""},{"line_number":66,"context_line":"        );"},{"line_number":67,"context_line":"        assert_eq!("},{"line_number":68,"context_line":"            llvm_triple_to_nix_double(\"arm-unknown-linux-gnueabihf\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"bb75c1b5_02779f99","line":65,"in_reply_to":"603c7752_e5b4f7d2","updated":"2022-10-13 19:32:39.000000000","message":"`config.sub` considers `arm-unknown-linux-gnueabi` to be canonical, and there is no special-case handling for it in cppnix (as there is for `armv6` and `armv7`), so I don\u0027t think we have any reason to change it, do we?","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"ad9e790dd0006599fa40d1b43d9d39679087a966","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        );"},{"line_number":63,"context_line":"        assert_eq!("},{"line_number":64,"context_line":"            llvm_triple_to_nix_double(\"arm-unknown-linux-gnueabi\"),"},{"line_number":65,"context_line":"            \"arm-linux\""},{"line_number":66,"context_line":"        );"},{"line_number":67,"context_line":"        assert_eq!("},{"line_number":68,"context_line":"            llvm_triple_to_nix_double(\"arm-unknown-linux-gnueabihf\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"aab25589_31c6f211","line":65,"in_reply_to":"b69fb2fd_a8047d8e","updated":"2022-10-24 12:18:08.000000000","message":"Acknowledging this because I think the current solution is \"good enough\" for now (as qyliss said).","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"685be5d01abd33853ebfe702f111c8cc2792baae","unresolved":true,"context_lines":[{"line_number":62,"context_line":"        );"},{"line_number":63,"context_line":"        assert_eq!("},{"line_number":64,"context_line":"            llvm_triple_to_nix_double(\"arm-unknown-linux-gnueabi\"),"},{"line_number":65,"context_line":"            \"arm-linux\""},{"line_number":66,"context_line":"        );"},{"line_number":67,"context_line":"        assert_eq!("},{"line_number":68,"context_line":"            llvm_triple_to_nix_double(\"arm-unknown-linux-gnueabihf\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"c551be84_47ea2a65","line":65,"in_reply_to":"bb75c1b5_02779f99","updated":"2022-10-13 20:22:08.000000000","message":"config.sub canonicalizes GNU triples.  You can\u0027t put an LLVM triple into it and expect it to give the result config.guess would give on that hardware.","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"834156b5546bd1160b4b0bc2e444bea6fb8bf2e7","unresolved":true,"context_lines":[{"line_number":62,"context_line":"        );"},{"line_number":63,"context_line":"        assert_eq!("},{"line_number":64,"context_line":"            llvm_triple_to_nix_double(\"arm-unknown-linux-gnueabi\"),"},{"line_number":65,"context_line":"            \"arm-linux\""},{"line_number":66,"context_line":"        );"},{"line_number":67,"context_line":"        assert_eq!("},{"line_number":68,"context_line":"            llvm_triple_to_nix_double(\"arm-unknown-linux-gnueabihf\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"b69fb2fd_a8047d8e","line":65,"in_reply_to":"c551be84_47ea2a65","updated":"2022-10-15 17:25:33.000000000","message":"In LLVM triples arm and armv6 are have the same archtype, they just differ in subarchtype (the former has none, the latter v6). So my suspicion would be that in both systems the plain arm is some kind of generic/default case and you default to armv6 when encountering it usually, but no actual platform has this as its “most canonical“ architecture type.","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"dcfa3fb75179804f72071481259249c6f071a527","unresolved":true,"context_lines":[{"line_number":74,"context_line":"        );"},{"line_number":75,"context_line":"        assert_eq!("},{"line_number":76,"context_line":"            llvm_triple_to_nix_double(\"mips-unknown-linux-gnu\"),"},{"line_number":77,"context_line":"            \"mips-linux\""},{"line_number":78,"context_line":"        );"},{"line_number":79,"context_line":"        assert_eq!("},{"line_number":80,"context_line":"            llvm_triple_to_nix_double(\"mips64-unknown-linux-gnuabi64\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"8b07b443_b5e49ad5","line":77,"updated":"2022-10-13 19:17:53.000000000","message":"Is \"mips\" what GNU calls this architecture?  I can believe it would, but we don\u0027t seem to support big-endian MIPS in Nixpkgs so it\u0027s not easy for me to check.","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"10c2427a2df0a6aa778c9e81fa62eeeee1c92b6b","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        );"},{"line_number":75,"context_line":"        assert_eq!("},{"line_number":76,"context_line":"            llvm_triple_to_nix_double(\"mips-unknown-linux-gnu\"),"},{"line_number":77,"context_line":"            \"mips-linux\""},{"line_number":78,"context_line":"        );"},{"line_number":79,"context_line":"        assert_eq!("},{"line_number":80,"context_line":"            llvm_triple_to_nix_double(\"mips64-unknown-linux-gnuabi64\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"ba116988_9b4b06eb","line":77,"in_reply_to":"8b07b443_b5e49ad5","updated":"2022-10-13 19:32:39.000000000","message":"Yes, the gnu-name for *big*-endian MIPS cpus is \"mips\".  The name for little-endian is \"mipsel\".","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"dcfa3fb75179804f72071481259249c6f071a527","unresolved":true,"context_lines":[{"line_number":110,"context_line":"        );"},{"line_number":111,"context_line":"        assert_eq!("},{"line_number":112,"context_line":"            llvm_triple_to_nix_double(\"riscv64gc-unknown-linux-gnu\"),"},{"line_number":113,"context_line":"            \"riscv64gc-linux\""},{"line_number":114,"context_line":"        );"},{"line_number":115,"context_line":"        assert_eq!("},{"line_number":116,"context_line":"            llvm_triple_to_nix_double(\"s390x-unknown-linux-gnu\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"35337ff6_74154597","line":113,"updated":"2022-10-13 19:17:53.000000000","message":"I\u0027d like this one double checked too, since I\u0027ve never seen the \"gc\" included in a Nix double, but could believe it might be.","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"10c2427a2df0a6aa778c9e81fa62eeeee1c92b6b","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        );"},{"line_number":111,"context_line":"        assert_eq!("},{"line_number":112,"context_line":"            llvm_triple_to_nix_double(\"riscv64gc-unknown-linux-gnu\"),"},{"line_number":113,"context_line":"            \"riscv64gc-linux\""},{"line_number":114,"context_line":"        );"},{"line_number":115,"context_line":"        assert_eq!("},{"line_number":116,"context_line":"            llvm_triple_to_nix_double(\"s390x-unknown-linux-gnu\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"3791d71a_0ed9e320","line":113,"in_reply_to":"35337ff6_74154597","updated":"2022-10-13 19:32:39.000000000","message":"Yeah `config.sub` rejects it, so I have removed that test case.  What is the \"gc\" supposed to mean?","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"685be5d01abd33853ebfe702f111c8cc2792baae","unresolved":true,"context_lines":[{"line_number":110,"context_line":"        );"},{"line_number":111,"context_line":"        assert_eq!("},{"line_number":112,"context_line":"            llvm_triple_to_nix_double(\"riscv64gc-unknown-linux-gnu\"),"},{"line_number":113,"context_line":"            \"riscv64gc-linux\""},{"line_number":114,"context_line":"        );"},{"line_number":115,"context_line":"        assert_eq!("},{"line_number":116,"context_line":"            llvm_triple_to_nix_double(\"s390x-unknown-linux-gnu\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"f3aa1583_8ea472db","line":113,"in_reply_to":"3791d71a_0ed9e320","updated":"2022-10-13 20:22:08.000000000","message":"I think it\u0027s GPU extensions.","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"ad9e790dd0006599fa40d1b43d9d39679087a966","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        );"},{"line_number":111,"context_line":"        assert_eq!("},{"line_number":112,"context_line":"            llvm_triple_to_nix_double(\"riscv64gc-unknown-linux-gnu\"),"},{"line_number":113,"context_line":"            \"riscv64gc-linux\""},{"line_number":114,"context_line":"        );"},{"line_number":115,"context_line":"        assert_eq!("},{"line_number":116,"context_line":"            llvm_triple_to_nix_double(\"s390x-unknown-linux-gnu\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"cab259ef_f2841260","line":113,"in_reply_to":"591fea63_27730475","updated":"2022-10-24 12:18:08.000000000","message":"Acknowledging this because I think the current solution is \"good enough\" for now (as qyliss said).","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"e4516ee93a99c8c6f253e7250ef333d05ac0391f","unresolved":true,"context_lines":[{"line_number":110,"context_line":"        );"},{"line_number":111,"context_line":"        assert_eq!("},{"line_number":112,"context_line":"            llvm_triple_to_nix_double(\"riscv64gc-unknown-linux-gnu\"),"},{"line_number":113,"context_line":"            \"riscv64gc-linux\""},{"line_number":114,"context_line":"        );"},{"line_number":115,"context_line":"        assert_eq!("},{"line_number":116,"context_line":"            llvm_triple_to_nix_double(\"s390x-unknown-linux-gnu\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"591fea63_27730475","line":113,"in_reply_to":"f3aa1583_8ea472db","updated":"2022-10-13 20:25:28.000000000","message":"\u003e I think it\u0027s GPU extensions.\n\n*C*PU extensions, I mean.","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"dcfa3fb75179804f72071481259249c6f071a527","unresolved":true,"context_lines":[{"line_number":142,"context_line":"        );"},{"line_number":143,"context_line":"        assert_eq!("},{"line_number":144,"context_line":"            llvm_triple_to_nix_double(\"armv5te-unknown-linux-gnueabi\"),"},{"line_number":145,"context_line":"            \"armv5te-linux\""},{"line_number":146,"context_line":"        );"},{"line_number":147,"context_line":"        assert_eq!("},{"line_number":148,"context_line":"            llvm_triple_to_nix_double(\"armv5te-unknown-linux-musleabi\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"4b946e4f_093bb0f1","line":145,"updated":"2022-10-13 19:17:53.000000000","message":"Should this be armv5tel?  That\u0027s what lib.systems.doubles calls it.","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"10c2427a2df0a6aa778c9e81fa62eeeee1c92b6b","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        );"},{"line_number":143,"context_line":"        assert_eq!("},{"line_number":144,"context_line":"            llvm_triple_to_nix_double(\"armv5te-unknown-linux-gnueabi\"),"},{"line_number":145,"context_line":"            \"armv5te-linux\""},{"line_number":146,"context_line":"        );"},{"line_number":147,"context_line":"        assert_eq!("},{"line_number":148,"context_line":"            llvm_triple_to_nix_double(\"armv5te-unknown-linux-musleabi\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"953abb10_ff1c1b06","line":145,"in_reply_to":"4b946e4f_093bb0f1","updated":"2022-10-13 19:32:39.000000000","message":"cppnix will only insert an extra \"l\" if the cpu-name is exactly \"armv6\" or exactly \"armv7\":\n\nhttps://github.com/NixOS/nix/blob/27ed3d04581b39b2653a50c0251b3d82fdade6f3/configure.ac#L19","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"dcfa3fb75179804f72071481259249c6f071a527","unresolved":true,"context_lines":[{"line_number":202,"context_line":"        );"},{"line_number":203,"context_line":"        assert_eq!("},{"line_number":204,"context_line":"            llvm_triple_to_nix_double(\"thumbv7neon-linux-androideabi\"),"},{"line_number":205,"context_line":"            \"thumbv7neon-linux\""},{"line_number":206,"context_line":"        );"},{"line_number":207,"context_line":"        assert_eq!("},{"line_number":208,"context_line":"            llvm_triple_to_nix_double(\"thumbv7neon-unknown-linux-gnueabihf\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"03a84c43_85bc9e4c","line":205,"updated":"2022-10-13 19:17:53.000000000","message":"Also worth checking I think.","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"10c2427a2df0a6aa778c9e81fa62eeeee1c92b6b","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        );"},{"line_number":203,"context_line":"        assert_eq!("},{"line_number":204,"context_line":"            llvm_triple_to_nix_double(\"thumbv7neon-linux-androideabi\"),"},{"line_number":205,"context_line":"            \"thumbv7neon-linux\""},{"line_number":206,"context_line":"        );"},{"line_number":207,"context_line":"        assert_eq!("},{"line_number":208,"context_line":"            llvm_triple_to_nix_double(\"thumbv7neon-unknown-linux-gnueabihf\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"3315f054_99484bf3","line":205,"in_reply_to":"03a84c43_85bc9e4c","updated":"2022-10-13 19:32:39.000000000","message":"Yep, `config.sub` accepts that.","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"ad9e790dd0006599fa40d1b43d9d39679087a966","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        );"},{"line_number":203,"context_line":"        assert_eq!("},{"line_number":204,"context_line":"            llvm_triple_to_nix_double(\"thumbv7neon-linux-androideabi\"),"},{"line_number":205,"context_line":"            \"thumbv7neon-linux\""},{"line_number":206,"context_line":"        );"},{"line_number":207,"context_line":"        assert_eq!("},{"line_number":208,"context_line":"            llvm_triple_to_nix_double(\"thumbv7neon-unknown-linux-gnueabihf\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"6a882910_5e388243","line":205,"in_reply_to":"24e877d3_64873370","updated":"2022-10-24 12:18:08.000000000","message":"Acknowledging this because I think the current solution is \"good enough\" for now (as qyliss said).","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"d42363bb652b59021d466b629461aed19ab61be7","unresolved":true,"context_lines":[{"line_number":202,"context_line":"        );"},{"line_number":203,"context_line":"        assert_eq!("},{"line_number":204,"context_line":"            llvm_triple_to_nix_double(\"thumbv7neon-linux-androideabi\"),"},{"line_number":205,"context_line":"            \"thumbv7neon-linux\""},{"line_number":206,"context_line":"        );"},{"line_number":207,"context_line":"        assert_eq!("},{"line_number":208,"context_line":"            llvm_triple_to_nix_double(\"thumbv7neon-unknown-linux-gnueabihf\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"24e877d3_64873370","line":205,"in_reply_to":"3315f054_99484bf3","updated":"2022-10-13 20:23:15.000000000","message":"(Unresolving until we\u0027re agreed on config.sub)","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"dcfa3fb75179804f72071481259249c6f071a527","unresolved":true,"context_lines":[{"line_number":226,"context_line":"        );"},{"line_number":227,"context_line":"        assert_eq!("},{"line_number":228,"context_line":"            llvm_triple_to_nix_double(\"aarch64_be-unknown-linux-gnu_ilp32\"),"},{"line_number":229,"context_line":"            \"aarch64_be-linux\""},{"line_number":230,"context_line":"        );"},{"line_number":231,"context_line":"        assert_eq!("},{"line_number":232,"context_line":"            llvm_triple_to_nix_double(\"aarch64_be-unknown-linux-gnu\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"10a4c371_8244d02f","line":229,"updated":"2022-10-13 19:17:53.000000000","message":"Does GNU use the same naming with the _be?","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"10c2427a2df0a6aa778c9e81fa62eeeee1c92b6b","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        );"},{"line_number":227,"context_line":"        assert_eq!("},{"line_number":228,"context_line":"            llvm_triple_to_nix_double(\"aarch64_be-unknown-linux-gnu_ilp32\"),"},{"line_number":229,"context_line":"            \"aarch64_be-linux\""},{"line_number":230,"context_line":"        );"},{"line_number":231,"context_line":"        assert_eq!("},{"line_number":232,"context_line":"            llvm_triple_to_nix_double(\"aarch64_be-unknown-linux-gnu\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"1e8aba2e_bfac15fe","line":229,"in_reply_to":"10a4c371_8244d02f","updated":"2022-10-13 19:32:39.000000000","message":"Yes.\n\nIsn\u0027t it lovely how there are four totally different conventions for expressing the endianness of a CPU? ;)","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"d42363bb652b59021d466b629461aed19ab61be7","unresolved":true,"context_lines":[{"line_number":226,"context_line":"        );"},{"line_number":227,"context_line":"        assert_eq!("},{"line_number":228,"context_line":"            llvm_triple_to_nix_double(\"aarch64_be-unknown-linux-gnu_ilp32\"),"},{"line_number":229,"context_line":"            \"aarch64_be-linux\""},{"line_number":230,"context_line":"        );"},{"line_number":231,"context_line":"        assert_eq!("},{"line_number":232,"context_line":"            llvm_triple_to_nix_double(\"aarch64_be-unknown-linux-gnu\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"342b2130_1ab34db6","line":229,"in_reply_to":"1e8aba2e_bfac15fe","updated":"2022-10-13 20:23:15.000000000","message":"(Unresolving until we\u0027re agreed on config.sub)","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"ad9e790dd0006599fa40d1b43d9d39679087a966","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        );"},{"line_number":227,"context_line":"        assert_eq!("},{"line_number":228,"context_line":"            llvm_triple_to_nix_double(\"aarch64_be-unknown-linux-gnu_ilp32\"),"},{"line_number":229,"context_line":"            \"aarch64_be-linux\""},{"line_number":230,"context_line":"        );"},{"line_number":231,"context_line":"        assert_eq!("},{"line_number":232,"context_line":"            llvm_triple_to_nix_double(\"aarch64_be-unknown-linux-gnu\"),"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"1b718529_6359aaac","line":229,"in_reply_to":"342b2130_1ab34db6","updated":"2022-10-24 12:18:08.000000000","message":"Acknowledging this because I think the current solution is \"good enough\" for now (as qyliss said).","commit_id":"6ad6a255b953952f350407bea315b6887e10d983"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"834156b5546bd1160b4b0bc2e444bea6fb8bf2e7","unresolved":true,"context_lines":[{"line_number":1,"context_line":"/// true iff the argument is recognized by cppnix as the second"},{"line_number":2,"context_line":"/// coordinate of a \"nix double\""},{"line_number":3,"context_line":"fn is_second_coordinate(x: \u0026str) -\u003e bool {"},{"line_number":4,"context_line":"    match x {"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"3181d40a_107f6426","line":1,"range":{"start_line":1,"start_character":40,"end_line":1,"end_character":49},"updated":"2022-10-15 17:25:33.000000000","message":"It rather matters what autoconf would put in host_os, keeping that list in sync is really annoying…\n\nIt\u0027s probably fine to stick with “empirical” nix systems.","commit_id":"f8d262004e0977ce4481fbc7484dcae6dd51ab41"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"ad9e790dd0006599fa40d1b43d9d39679087a966","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/// true iff the argument is recognized by cppnix as the second"},{"line_number":2,"context_line":"/// coordinate of a \"nix double\""},{"line_number":3,"context_line":"fn is_second_coordinate(x: \u0026str) -\u003e bool {"},{"line_number":4,"context_line":"    match x {"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"27417250_835c0ca5","line":1,"range":{"start_line":1,"start_character":40,"end_line":1,"end_character":49},"in_reply_to":"3181d40a_107f6426","updated":"2022-10-24 12:18:08.000000000","message":"Ack","commit_id":"f8d262004e0977ce4481fbc7484dcae6dd51ab41"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"834156b5546bd1160b4b0bc2e444bea6fb8bf2e7","unresolved":true,"context_lines":[{"line_number":22,"context_line":"        },"},{"line_number":23,"context_line":"    };"},{"line_number":24,"context_line":"    let os \u003d match parts[1..] {"},{"line_number":25,"context_line":"        [_vendor, kernel, _environment] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":26,"context_line":"        [_vendor, kernel] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":27,"context_line":"        [kernel, _environment] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":28,"context_line":"        _ \u003d\u003e panic!(\"unrecognized triple {llvm_triple}\"),"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"7eddda56_4fa6f9f4","line":25,"range":{"start_line":25,"start_character":43,"end_line":25,"end_character":63},"updated":"2022-10-15 17:25:33.000000000","message":"I think this check is irrelevant, since we can safely assume that it is the second coordinate. A four-part LLVM triple is always arch-vendor-os-environment.\n\nOTOH succeeding here with an unknown os, but failing in a three triple case would be confusing, so maybe we can just add another case for a 4 triple which has an error message that\u0027s more descriptive, i.e. unknown os.","commit_id":"f8d262004e0977ce4481fbc7484dcae6dd51ab41"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"ad9e790dd0006599fa40d1b43d9d39679087a966","unresolved":false,"context_lines":[{"line_number":22,"context_line":"        },"},{"line_number":23,"context_line":"    };"},{"line_number":24,"context_line":"    let os \u003d match parts[1..] {"},{"line_number":25,"context_line":"        [_vendor, kernel, _environment] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":26,"context_line":"        [_vendor, kernel] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":27,"context_line":"        [kernel, _environment] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":28,"context_line":"        _ \u003d\u003e panic!(\"unrecognized triple {llvm_triple}\"),"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"237d0b03_65c36967","line":25,"range":{"start_line":25,"start_character":43,"end_line":25,"end_character":63},"in_reply_to":"7eddda56_4fa6f9f4","updated":"2022-10-24 12:18:08.000000000","message":"Acknowledging this because I think the current solution is \"good enough\" for now (as qyliss said).","commit_id":"f8d262004e0977ce4481fbc7484dcae6dd51ab41"},{"author":{"_account_id":1000018,"name":"Alyssa Ross","display_name":"qyliss","email":"hi@alyssa.is","username":"qyliss"},"change_message_id":"9efe5df82aabaeef9075b5a52d703d7ac27afeac","unresolved":true,"context_lines":[{"line_number":24,"context_line":"    let os \u003d match parts[1..] {"},{"line_number":25,"context_line":"        [_vendor, kernel, _environment] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":26,"context_line":"        [_vendor, kernel] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":27,"context_line":"        [kernel, _environment] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":28,"context_line":"        _ \u003d\u003e panic!(\"unrecognized triple {llvm_triple}\"),"},{"line_number":29,"context_line":"    };"},{"line_number":30,"context_line":"    format!(\"{cpu}-{os}\")"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"070316ee_4827f287","line":27,"updated":"2022-10-13 20:29:47.000000000","message":"What case is this for btw?","commit_id":"f8d262004e0977ce4481fbc7484dcae6dd51ab41"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"834156b5546bd1160b4b0bc2e444bea6fb8bf2e7","unresolved":true,"context_lines":[{"line_number":24,"context_line":"    let os \u003d match parts[1..] {"},{"line_number":25,"context_line":"        [_vendor, kernel, _environment] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":26,"context_line":"        [_vendor, kernel] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":27,"context_line":"        [kernel, _environment] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":28,"context_line":"        _ \u003d\u003e panic!(\"unrecognized triple {llvm_triple}\"),"},{"line_number":29,"context_line":"    };"},{"line_number":30,"context_line":"    format!(\"{cpu}-{os}\")"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"81ef1be9_66568f57","line":27,"in_reply_to":"070316ee_4827f287","updated":"2022-10-15 17:25:33.000000000","message":"I think e.g. x86_64-linux-gnu (lacking a vendor part). It seems like LLVM triples in this form are accepted, but if cargo normalizes TARGET, we would never get such a triple.","commit_id":"f8d262004e0977ce4481fbc7484dcae6dd51ab41"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"6894875e70170a985a61164797d8294cc28f2b6f","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    let os \u003d match parts[1..] {"},{"line_number":25,"context_line":"        [_vendor, kernel, _environment] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":26,"context_line":"        [_vendor, kernel] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":27,"context_line":"        [kernel, _environment] if is_second_coordinate(kernel) \u003d\u003e kernel,"},{"line_number":28,"context_line":"        _ \u003d\u003e panic!(\"unrecognized triple {llvm_triple}\"),"},{"line_number":29,"context_line":"    };"},{"line_number":30,"context_line":"    format!(\"{cpu}-{os}\")"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"2df08f43_ae8438f0","line":27,"in_reply_to":"81ef1be9_66568f57","updated":"2022-10-16 07:16:23.000000000","message":"`aarch64-linux-android`","commit_id":"f8d262004e0977ce4481fbc7484dcae6dd51ab41"}]}
