6 ms·
It's really great to be able to skip compiling LLVM when bootstrapping a whole OS/toolchain from source and only Rust happens to pull LLVM in. Besides the gcc
by goombacloud 5y ago
It's really great to be able to skip compiling LLVM when bootstrapping a whole OS/toolchain from source and only Rust happens to pull LLVM in.
Besides the gcc work I'm actually also hoping for the rustc_codegen_cranelift work to land one day!
- Vogtinator 5y agoFor proper bootstrapping I'm looking forward to gccrs (https://github.com/Rust-GCC/gccrs https://github.com/Rust-GCC/gccrs) alongside mrustc.
- hardware2win 5y agoCompiling llvm is a nightmare
- wyldfire 5y agoIn terms of satisfying the dependencies, or the build time, or something else?
- JonChesterfield 5y agoDependencies are few and largely optional but build time is tedious
- aseipp 5y agoBuild time. If you only need one or two components (clang, clang-tools-extra) and trim down the number of target architectures, it's not so bad. But if you want most of the components and architectures enabled, and tested with a Release-with-asserts build... The build parallelism scales pretty well though so if you want some white noise in the background, by all means. It's kind of nice for keeping your feet warm sometimes.
- da-x 5y agoCompiling LLVM for what purpose? Hacking on it? Producing an optimized build? Installing a build on a user's machine? You should be more specific. The default clean build works just fine. On my machine I can clone the Git repo, do `mkdir build && cmake ../llvm && make -j64` and end up with working binaries after 5 minutes. The build take 37GB by default here, and the binaries under bin/ are immediately usable work. If you want a smaller build with shared library just add a parameter. Want to throw in sub-projects such as LLD or Clang? Just another parameter. It's all very well-documented.
- FooBarWidget 5y ago> `make -j64` and end up with working binaries after 5 minutes. I think the problematic part for most people lies in the first two words in that quoted sentence.
- meinersbur 5y ago`mkdir build && cmake ../llvm -GNinja && ninja` better?
- lazypenguin 5y agoMost people don’t have 64 cores available to them to compile LLVM in 5 minutes. Switching to ninja doesn’t really solve that problem.
- bregma 5y agoYou missed the part where you upgrade your RAM to at least 128 GB and up the swap to 512 GB and use gold as your linker because the OOM killer will still raise it's head for ld under those extreme restrictions.
- shipp02 5y agoSorry, what are you talking about. I have built ponylang, build llvm with a couple of patches from source on my 2018 Mac book air. Just don't put -j64. The first build will take a couple of hours but that is par for the course for a project of llvm's size and complexity. The subsequent buttons take a couple minutes.
- jcelerier 5y agoI don't understand why anyone would use ld or gold in 2022. Every distro has shipped lld for years and it links in less than seconds. It's a default to not break compatibility, not because it's good ; makes as much sense to use as ed(1). For reference on a 8C/16T CPU from 2016 an llvm initial build is ~10-12 minutes here.. not instant but not the end of the world either.
- junon 5y agoit's two commands for me. What issues do you face?
- hardware2win 5y agoStarted on windows, installed shitton of stuff Then after 30min on 99% ram usage it BSoD Then i created linux vm but couldnt figure out crossplatform build or something like that Then i created windows vm with 8gb of ram and it worked fine
- junon 5y agoBuilding things on Windows by itself is a nightmare in most cases. I use WSL (1, not 2, though either should work) and it build just fine. I rec going that route if you want to do linux-ey development but still keep Windows.
- hardware2win 5y agobut did you use those binaries on windows? because thats what i want to achieve