Skip to content

Reorganize llvm and clang libs and bindings #2373

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

Closed
brson opened this issue May 10, 2012 · 8 comments
Closed

Reorganize llvm and clang libs and bindings #2373

brson opened this issue May 10, 2012 · 8 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@brson
Copy link
Contributor

brson commented May 10, 2012

Right now we have a native library, rustllvm, that contains LLVM + some extra Rust-specific glue-code, and we have hand-written LLVM bindings in rustc. Soon we will also need clang bindings.

As part of integrating bindgen and its clang bindings I would like to restructure our llvm libs.

The gist of it is that we have two rust crates, llvm and clang, which contain bindings and are statically linked to their native libraries. The primary benefit is that we will have no native libraries for rust-based llvm consumers to deal with. The secondary benefit is that it clearly exposes the rust APIs for llvm so other tools can use them.

@ghost ghost assigned brson May 10, 2012
@brson
Copy link
Contributor Author

brson commented May 12, 2012

This arrangement probably won't work when it's time to make official Debian packages.

@Fiyorin
Copy link

Fiyorin commented Sep 30, 2012

when compiling the entire rust from a release tarball: why not depend on the host LLVM/Clang, if its installed?
"aptitude install llvm clang" and call it a day?
i'm getting build issues which are from fixed bugs in clang, which havent made it into rust yet, and the whole compile takes forever.
just an idea.

@brson
Copy link
Contributor Author

brson commented Sep 30, 2012

We have a number of GC-related patches on our fork right now, but the goal is to work on stock LLVM eventually.

@brson
Copy link
Contributor Author

brson commented Sep 30, 2012

With some effort we could probably get Rust to work with upstream LLVM, because the GC stuff is releatively self contained and only used in experimental builds.

@pnkfelix
Copy link
Member

Not critical for 0.6; de-milestoning

@pnkfelix
Copy link
Member

visiting for triage. I considered nominating this for a milestone, but honestly, I could imagine shipping 1.0 without teasing out our locally patched LLVM.

@brson When you said "This arrangement probably won't work when it's time to make official Debian packages.", which arrangement were you referring to? The current arrangement? Or the one you proposed? (my best guess is that you were referring to the current arrangement.)

@thestinger
Copy link
Contributor

Debian and Fedora aren't going to care for us not using the upstream LLVM, and we're going to need to be able to use the system libuv/gyp.

@alexcrichton
Copy link
Member

We have no clang bindings, and otherwise all the points of the issue have been worked out. The llvm and rustllvm libraries are both statically linked into rustc, so we don't have to worry about their distribution at all any more.

Closing in favor of #8275 (which is what's left to do on this issue).

bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
Allow ui tests to have dependencies in a reliable way

This completely sidesteps the issue that compiletest-rs has where old artifacts of a dependency cause `multiple available crates of name XXX` errors. At this point I think we've reached feature parity for clippy, too, so I'm going to try publishing a version once this is merged.
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Add the #[unstable] attribute that will allow us to mark unstable APIs. This PR only adds the attributes and we still need to add the option to enable them and to error out if the user is trying to use an unstable item without explicitly opting-in.
tshepang added a commit to tshepang/rust that referenced this issue May 15, 2025
tshepang added a commit to tshepang/rust that referenced this issue May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

5 participants