-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Cygwin support in rustc #140154
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
base: master
Are you sure you want to change the base?
Cygwin support in rustc #140154
Conversation
rustbot has assigned @compiler-errors. Use |
This comment was marked as outdated.
This comment was marked as outdated.
I'm looking forward to being able to try this, and I bet @tyan0 and others from Cygwin are too! |
This should be fixed now (llvm/llvm-project#136599), and
|
This comment was marked as outdated.
This comment was marked as outdated.
7ee303f
to
d23fa03
Compare
r? @jieyouxu |
Co-authored-by: Ookiineko <[email protected]>
The Miri subtree was changed cc @rust-lang/miri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine, I'll r+ after PR CI is green.
@bors r+ |
let fname_ptr = info.dli_fname.as_ptr(); | ||
#[cfg(not(target_os = "cygwin"))] | ||
let fname_ptr = { | ||
if info.dli_fname.is_null() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, this can be null? I can't find that in the docs. Miri seems to assume it's never null...
(This is pre-existing, not new in this PR.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://man7.org/linux/man-pages/man3/dladdr.3.html
If the address specified in addr could not be matched to a shared
object, then these functions return 0. In this case, an error
message is not available via dlerror(3).
My read of that is that either it finds a shared object, in which case dli_fname is valid, or else it will return 0 (but not tell you why in dlerror).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dladdr
can return null, yes. That's handled above. I am talking about dli_fname
being null, which is different and which should not be possible according to the docs.
This PR builds host rustc targeting cygwin.
ctrlc
,libloading
andnix
for rustc #140921Currently supported:
Blocking:
cargo update
, fixed upstream