rustc_codegen_gcc: Progress Report #35
(blog.antoyo.xyz)
from antoyo@programming.dev to rust@programming.dev on 08 Apr 18:24
https://programming.dev/post/28274804
from antoyo@programming.dev to rust@programming.dev on 08 Apr 18:24
https://programming.dev/post/28274804
I’ve been pretty busy in my life recently, but I finally got around writing this blog post. Hopefully, things are sorted out in my personal life and I should be able to be more regular about these updates in the future.
I’m very happy to see good progress towards rustup distribution (thanks to Kobzol again!).
threaded - newest
Huh haven’t heard of this for quite some time, nice it’s still going strong :)
Great to hear!
Great to see this progressing still.
Great to see you posting here as well.
All the best.
@antoyo@programming.dev
I gave this a try for the first time. Non-LTO build worked. But LTO build failed:
I don’t have the time to build gcc and test. But presumably,
liblto_plugin.so
should be included withlibgccjit.so
?Oh, and
clean all
doesn’t work reliably. Since trying to build inrelease
mode after building indebug
mode thenclean
ing is weirdly broken.And It’s not clear from the README how to build in
release
mode without runningtest --release
. And the fact that all combinations of–release-sysroot
and–release --sysroot
and–release --release-sysroot
exist doesn’t help 😉Thanks for reporting this! I cannot reproduce with the following:
(it shows:
Successfully ran clean all
)Could you please provide the commands you ran to get this? (It might also be easier for me to track this if you open an issue on GitHub since I don’t come here often.)
Also, thanks for the suggestion for better documentation: I created an issue for this.
Yeah, apologies for not communicating the issue clearly.
And then trying to use the “release” build fails:
I will make sure to report issues directly in the future, although from account(s) not connected to this username.
The issue here is that you didn’t provide
–build-sysroot
to./y.sh test --release
, so it cannot find thestd
crate.But running
does work. That’s what gave me the impression that
clean all
doesn’t actually clean everything!It does actually clean everything. You need to call
./y.sh prepare
again if you ranclean all
; otherwise, it will fail to find some stuff likerustc-std-workspace-alloc
.I opened an issue to improve the documentation in this regards. Thanks for testing all this: this will help me improve the documentation.
Aha! Good to know. And yes, improved documents would be of great help.
Thanks again for working on this.
The setup to be able to use LTO is non-trivial for now (I hope to be able to fix this soon so that
liblto_plugin.so
is not required for the case where a linker plugin wasn’t not asked by the user, which is the default).You need to have in your path the
gcc
built with the same version aslibgccjit
, which containslibexec/gcc/x86_64-pc-linux-gnu/15.0.0/liblto_plugin.so
.