Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ship llvm binutils with the Rust toolchain #50

Closed
japaric opened this issue Feb 23, 2018 · 4 comments
Closed

Ship llvm binutils with the Rust toolchain #50

japaric opened this issue Feb 23, 2018 · 4 comments

Comments

@japaric
Copy link
Member

japaric commented Feb 23, 2018

As per the discussion in #43, it would be convenient to have LLVM tools like llvm-objdump and
llvm-size shipped with the Rust toolchain. These would remove the need to have to install GCC
binutils which require you to do one binutils install per target architecture. OTOH, LLVM binutils
have multi-arch support and support all (most?) the architectures that rustc supports (since rustc
is LLVM based).

Tasks

We are looking for someone to take on this task:

  • Submit an RFC to ship llvm binutils with the Rust toolchain. @japaric can help with the
    edition of the RFC.

The RFC should make the case for having these tools shipped with the Rust toolchain. llvm-objdump,
llvm-nm and llvm-size are pretty useful to diagnose problems and to measure / estimate metrics
like binary size and performance. llvm-objcopy can be used to translate ELF files (what rustc
usually outputs) into binary files (what program loaders expect). llvm-cov nicely complements
rustc profiling support (-Zprofile).

The team will bring this up during the Rust All Hands event (last week of March) and we'll see if we need an RFC.

@whitequark is llvm-cxxfilt actually needed? It shouldn't contain architecture specific code,
right? Also, there's a Rust implementation of c++filt.

The RFC should note that note as a drawback that does this makes us more reliant on LLVM but we are
already shipping lld (a much bigger LLVM tool) with the Rust toolchain as of rust-lang/rust#48125
(we should submit the RFC after that PR lands).

Part of #43

@whitequark
Copy link

Also, there's a Rust implementation of c++filt.

Rustfilt is not an implementation of c++filt, it takes Rust symbols and not C++ symbols; the former are a tiny subset of the latter. But I suppose if you're compiling C++ code then you already have clang, and that probably already comes with llvm-cxxfilt, so we don't need it.

This was referenced Feb 23, 2018
@japaric japaric self-assigned this Feb 23, 2018
@japaric
Copy link
Member Author

japaric commented Feb 28, 2018

Adding to the epoch 2018 milestone as discussed in yesterday's meeting

@japaric japaric added this to the Epoch 2018 milestone Feb 28, 2018
@japaric
Copy link
Member Author

japaric commented Apr 2, 2018

I have opened rust-lang/rust#49584 to discuss this with the dev-tools and other Rust teams.

@japaric
Copy link
Member Author

japaric commented Jun 29, 2018

Woot! The llvm-tools rustup component is now a thing. Check the announcement for details.

This is now done so closing. 🎉

@japaric japaric closed this as completed Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants