As I am converting from triples to roc target, one location that has an extra dependency is related to the windows build. I was wondering if this is an old hack or if it is still used.
For building zig native hosts on windows with gnu, we use x86_64-windows-gnu
. Do we actually run into windows with gnu when calling Triple::host()
? I would assume that the host triple is never going to produce windows gnu. Given we have no way to specify the x86_64-windows-gnu
triplet from the command line, I would assume that this is not actually possible to hit currently. Is that the case?
CC: @Luke Boswell or @Folkert de Vries
I think you two know the most about the windows build.
I'm not sure. Are you talking about building the platform side? I thought the plan was to rip all the platform building out from roc and just use pre-built binaries and the platforms are responsible for building themselves
?
I'm on my Windows machine at the moment, so happy to test out any ideas if you have a branch and need any help.
This is in the legacy linker. So yeah, in code that should eventually get ripped out. Some is for building the platform. Some is used for link windows.
Don't have a branch yet, just a pile of code that doesn't compile yet.
Anyway, you can still test
Try removing this branch and just always using "native": https://github.com/roc-lang/roc/blob/d988eadbb1ed9d2f9e559564875355b1760fdef7/crates/compiler/build/src/link.rs#L788-L792
@Brendan Hansknecht from my testing on Windows I can't see any difference just using "native"
Awesome... More stuff I can rip out
https://mcyoung.xyz/2025/04/14/target-triples/ is both an excellent article and also a good motivating explanation for why I don't want roc
to support target triples :laughing:
(and instead support massively simplified options like linux-x64
which we can enumerate)
fwiw, i would note that zig's notion of target triples already is much more principled in design than gnu/llvm/rust triples, and will be even more so in the near future:
not necessarily saying this to dissuade you from what you want to do, just to point out that target triples (or perhaps more appropriately "target strings" in the future) can actually be not-insane
Last updated: Jul 06 2025 at 12:14 UTC