23 Aug 2024 |
Theo Paris | If I set useLLVM and linker to lld in crossSystem instead of outside crossSystem, it fails to build compiler-rt-libc. | 04:11:32 |
Theo Paris | * If I set useLLVM and linker to lld in crossSystem instead of outside crossSystem, it fails to build compiler-rt-libc, probably because it tries to use lld flags with lld-link | 04:12:12 |
K900 | Yeah this is very wrong for a variety of reasons | 04:14:21 |
K900 | What are you trying to achieve here | 04:14:28 |
K900 | Do you want MinGW or MSVC | 04:14:37 |
Theo Paris | I am trying to cross compile a rust crate with mingw and LLVM. | 04:14:55 |
K900 | This makes no sense because MinGW is GNU | 04:15:30 |
K900 | So do you want MinGW or LLVM | 04:15:37 |
Theo Paris | I wanted mingw because its posix | 04:15:46 |
K900 | Then why is LLVM even there | 04:16:00 |
Theo Paris | Because I want to use llvm tools and clang instead of gcc | 04:16:19 |
K900 | Why? | 04:16:45 |
Theo Paris | If there is a way to uses clang/lld-link to cross compile without mingw then I have no idea what that way would be. | 04:16:55 |
K900 | MinGW is generally only tested with the GNU toolchain | 04:17:00 |
K900 | There is a way, yes | 04:17:12 |
K900 | The way is to use the native MSVC ABI targets | 04:17:20 |
K900 | See e.g. https://gitlab.com/K900/rust-cross-windows | 04:17:37 |
Theo Paris | That requires the proprietary msvc libraries, but it's certainly something I can try. I'd like to be able to get llvm and mingw to work with nix in the future if that is possible to achieve. | 04:19:44 |
K900 | It is probably possible, but it's going to be a sizable amount of work, and honestly, MinGW is a gigantic hack anyway | 04:20:15 |
K900 | I personally would much prefer to see better support for MSVC targets | 04:20:28 |
K900 | But that's way harder | 04:20:32 |
Theo Paris | I did get closer outside of nix/nixpkgs by using rust-lld with x86_64-pc-windows-gnullvm but ran into the fact that rustc hard codes the --nxcompat flag for windows targets, which fails to work with lld-link. So I think the crossSystem and compiler-rt issues are specific to nixpkgs | 04:21:47 |
Theo Paris | * I did get closer outside of nix/nixpkgs by using lld with x86_64-pc-windows-gnullvm but ran into the fact that rustc hard codes the --nxcompat flag for windows targets, which fails to work with lld-link. So I think the crossSystem and compiler-rt issues are specific to nixpkgs | 04:22:09 |
Theo Paris | * I did get closer outside of nix/nixpkgs by using lld-link with x86_64-pc-windows-gnullvm but ran into the fact that rustc hard codes the --nxcompat flag for windows targets, which fails to work with lld-link. So I think the crossSystem and compiler-rt issues are specific to nixpkgs | 04:22:24 |
aktaboot | what do you usually do to get rust-nightly packages in your system ? | 17:53:32 |
K900 | rust-overlay or fenix | 17:56:46 |
aktaboot | thanks I guess rust-overlay fits what I am looking for :) | 17:59:20 |
damccull | If I cargo build on a nixos system, I'm getting an exe with the wrong interpreter for a regular system...I think...how do I tell nix build to build it for a regular system so I can copy over to one of those? | 22:04:13 |
24 Aug 2024 |
K900 | You can't really | 03:35:48 |
K900 | And it's not guaranteed to work properly anyway because of glibc symbol versioning nonsense | 03:36:04 |