-
Notifications
You must be signed in to change notification settings - Fork 13.3k
proc-macro-srv: make usage of RTLD_DEEPBIND portable #135591
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
proc-macro-srv: make usage of RTLD_DEEPBIND portable #135591
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
the constant is wrong on some platforms (e.g., on mips64el it's 0x10, and 0x8 is RTLD_NOLOAD which makes all this functionality broken), the libc crate takes care of those differences for us. fallback to old hard-coded value for non-glibc environments (which might or might not of DEEPBIND support). Signed-off-by: Fabian Grünbichler <[email protected]>
0402606
to
c8a5a8d
Compare
Why is this change being proposed here, instead of in rust-analyzer? r? @bjorn3 since you started reviewing the previous PR (I don't have much context here but it seems like not using a non-declared context is OK, though probably a better comment referencing whether we care is good). |
because AFAICT the test cases exercising this only run when built as part of the rustc tree. but if you prefer it coming in the other way, that's fine by me as well :) |
The proc-macro server tests do run in the rust-analyzer CI (when relevant source files are changed, as is the case here). Unless you mean some other specific test with relevant. |
I didn't manage to get them to run locally (except via
whereas the CI run for this PR:
|
They require the nightly toolchain so they only run on r-a CI when proc-macro things change. To run them locally you'll need to pass a feature flag |
that was the missing piece, thanks :) I will move this over to R-A then! |
closed in favour of rust-lang/rust-analyzer#18981 |
the constant is wrong on some platforms (e.g., on mips64el it's 0x10, and 0x8 is RTLD_NOLOAD which makes all this functionality broken), the libc crate takes care of those differences for us.
fallback to old hard-coded value for non-glibc environments (which might or might not have RTLD_DEEPBIND support).