-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Remove C++ dependencies #11121
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
Remove C++ dependencies #11121
Conversation
The only thing blocking me from r+'ing this PR is the forceful addition of Other than that though, this is again truly amazing! Fantastic job with explaining everything in the comments, you are a hero! |
@acrichton: PR updated. BTW, that |
thanks! |
I think this just needs to compile the |
Ok, done. |
This PR removes Rust's dependency on C++ for exception handling. Instead, it will use the unwind library API directly. closes #10469
OSX has libgcc_s apparently instead of libgcc. |
Should I get rid of #[link(name="gcc")] then? |
I would like to better understand our GPL obligations after this patch. In what scenario will we be statically linking libstcxx? More than just for snapshots now? I suspect that we need to leave in the previous language about the GPL re libstcxx in the snapshots and furthermore may have new obligations depending on where else were doing static linking. |
I believe that this will need something along the lines of: // explain that this is what provides the gcc_personality function and libunwind interface in this comment.
#[cfg(target_os = "macos")]
#[link(name = "gcc_s")]
extern {}
#[cfg(not(target_os = "macos"))]
#[link(name = "gcc")]
extern {} Apparently both ubuntu and freebsd have both libgcc and libgcc_s, unsure of what the difference is. |
@vadimcn I do see that the GPL runtime exception allows distribution via static linking, but I'm assuming that if we distribute the statically linked binary then we have to include the license. That makes me think we need to leave the language in the "third-party" readme about the library. |
hope this does it. r? |
Can you squash these commits into one? |
Done. |
This PR removes Rust's dependency on C++ for exception handling. Instead, it will use the unwind library API directly. closes #10469
…lip1995 Pass correct substs to `implements_trait` in `incorrect_impls` `Copy<T>` does in fact not exist. The substs on the trait_ref contain the `Self` type of the impl as the first parameter, so passing that to `implements_trait`, which then nicely prepends the `Self` type for us does not end will. fixes rust-lang#11121 The assertions requires debug assertions inside rustc, which is probably why it didn't fire here. I tested the change locally in rust-lang/rust and it did not ICE anymore. cc `@xFrednet` `@Centri3` changelog: [`incorrect_impls`]: fix confusion about generic parameters
This PR removes Rust's dependency on C++ for exception handling. Instead, it will use the unwind library API directly.
closes #10469