Live data from Hacker News

Rustc_codegen_GCC can now bootstrap rustc

blog.antoyo.xyz

31–40 of 49 posts

Re: Rustc_codegen_GCC can now bootstrap rustc

#31
post #24
post #14

Earlier quoted context omitted.

64 cores, and it takes 5 minutes? That’s… not awesome. Most people do not have 64 (presumably high performance) cores lying around for the purpose of building dependencies.

10 minutes of a c6i.32xlarge costs less than a dollar at on-demand rates in the us-east-2 AWS region. That'll get you 128 vCPUs and 256 gb of memory. I think people put up with a lot of stuff that there's no reason to any more with on-demand computing.

> 10 minutes of a c6i.32xlarge costs less than a dollar at on-demand rates in the us-east-2 AWS region.

That assumes you have an AWS account. There are legitimate reasons to not have an AWS account; for instance, you might not want to risk accidentally racking up huge bills, or you might not have access to a payment method AWS accepts, or you might want to avoid using services under USA jurisdiction (due to GDPR concerns or similar).

Re: Rustc_codegen_GCC can now bootstrap rustc

#32
post #31
post #24

Earlier quoted context omitted.

10 minutes of a c6i.32xlarge costs less than a dollar at on-demand rates in the us-east-2 AWS region. That'll get you 128 vCPUs and 256 gb of memory. I think people put up with a lot of stuff that there's no reason to any more with on-demand computing.

> 10 minutes of a c6i.32xlarge costs less than a dollar at on-demand rates in the us-east-2 AWS region. That assumes you have an AWS account. There are legitimate reasons to not have an AWS account; for instance, you might not want to risk accidentally racking up huge bills, or you might not have access to a payment method AWS accepts, or you might want to avoid using services under USA jurisdiction (due to GDPR conc…

You can use AWS and be GDPR compliant. What are you talking about?

Re: Rustc_codegen_GCC can now bootstrap rustc

#33
post #24
post #14

Earlier quoted context omitted.

64 cores, and it takes 5 minutes? That’s… not awesome. Most people do not have 64 (presumably high performance) cores lying around for the purpose of building dependencies.

10 minutes of a c6i.32xlarge costs less than a dollar at on-demand rates in the us-east-2 AWS region. That'll get you 128 vCPUs and 256 gb of memory. I think people put up with a lot of stuff that there's no reason to any more with on-demand computing.

Is there a service that rides on top of aws that offers distcc (or whatever equivalent) or direct pure compile with source uplodate and nothing else? I'd rather pay them than deal with AWS.

Re: Rustc_codegen_GCC can now bootstrap rustc

#34
post #4

Earlier quoted context omitted.

I don't see why the GCC codegen would end up with major performance improvements - my understanding is that GCC and LLVM are basically on par with performance, with some workloads being a tiny bit better in one or the other. Is that wrong?

Up until now the rust compiler has been finely tuned for LLVM. I would expect the GCC backend to perform worse initially, then improve over time depending on how much use it gets.

There isn't actually that much that a frontend author can do to tune it beyond exposing the right invariants.

Re: Rustc_codegen_GCC can now bootstrap rustc

#35
post #20
post #17

Earlier quoted context omitted.

GCC is still basically better overall but it's basically chaotic. LLVM seems to have better defaults for branch-y compiler code, but GCC has a lot of tricks up its sleeve that LLVM hasn't got. FWIW though I think GCC is really playing with fire when it comes to it's future - the mailing list approach to development deters new contributors, the testing infrastructure is quite arcane, etc. GCC should be an aspirational…

>FWIW though I think GCC is really playing with fire when it comes to it's future - the mailing list approach to development deters new contributors, the testing infrastructure is quite arcane, etc. And LLVM is better? At the start of last year I found and fixed a small bug in LLVM[1]. I submitted the fix via their Phabricator instance and it was approved by project members after a few days. As per the contributor gu…

I get that LLVM can be bad too but at least there's a phabricator at all.

Re: Rustc_codegen_GCC can now bootstrap rustc

#36

Earlier quoted context omitted.

I 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.

lld is not 100% compatible with ld; switching to it usually works, but occasionally breaks the build of some software. That's especially true for complex cases involving linker scripts and unusual binary layouts with various sections. (Those cases also tend to be hard to debug.)

But it's really well tested for building llvm and clang, so that suits the use case this thread is focused on.

Re: Rustc_codegen_GCC can now bootstrap rustc

#37
post #11

Earlier quoted context omitted.

Compiling llvm is a nightmare

Compiling 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. I…

Pretty good April 1 post!

Re: Rustc_codegen_GCC can now bootstrap rustc

#38
post #31
post #24

Earlier quoted context omitted.

10 minutes of a c6i.32xlarge costs less than a dollar at on-demand rates in the us-east-2 AWS region. That'll get you 128 vCPUs and 256 gb of memory. I think people put up with a lot of stuff that there's no reason to any more with on-demand computing.

> 10 minutes of a c6i.32xlarge costs less than a dollar at on-demand rates in the us-east-2 AWS region. That assumes you have an AWS account. There are legitimate reasons to not have an AWS account; for instance, you might not want to risk accidentally racking up huge bills, or you might not have access to a payment method AWS accepts, or you might want to avoid using services under USA jurisdiction (due to GDPR conc…

AWS was just an easily accessible example. Sub in OVH if you prefer, I'm sure they have similar options for similar prices.

Re: Rustc_codegen_GCC can now bootstrap rustc

#40
post #16

Earlier quoted context omitted.

`mkdir build && cmake ../llvm -GNinja && ninja` better?

You 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.

I compile llvm on machine with 4gb ram
Post reply on HN