-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Multiple emit targets don’t ignore -o
option, contrary to the warning
#20130
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
Comments
6e7968b suggests that this behavior is intended. Specifically:
I think the warning message is misleading, and is probably not even necessary. What do we think about removing this warning entirely, and updating |
That commit message contradicts itself further down (and still doesn’t match the current behaviour):
The emphasis mine. What’s the expected behaviour here @alexcrichton? |
I don't recall what was intended but it does seem that the current behavior is inconsistent and the warning message is wrong. Based on the current behavior my preference is that if there are multiple output types that we name them all based on the provided file stem, meaning just change the library output to conform to the existing behavior. @alexcrichton What do you think? |
This is possibly a good time and place to brainstorm about this, since this is one of the cornerstones of compiler usage. This is what sounds most sensible to me:
It does not depend on any combination of flags and works predictably (though very incompatible to other compilers) well. |
My thinking is the same as @brson's, the intended operation is something like:
The |
I submitted a rust-lang/rfcs#595 regarding this. |
Since we can't actually change this behavior anymore since it would be breaking, would a pull request that just gets rid of the incorrect warning be accepted? |
Yes, let's change this so that, only if In Rust 2 we should consider changing it so all output types are affected by the rename. |
Willing to help anyone who wants to work on this |
Ya I'd take it |
@hgallagher1993 You got it! |
@hgallagher1993 How's it going? |
@brson I actually haven’t had a chance to even look at it, long hours in the office all last week. It's going to have my undivided attention for the next few days 😃 I'm probably going to need a bit of this as well @Manishearth |
OK, thanks for the status update! |
@Manishearth I've been looking at this task and I was just wondering could I get some direction on how to start this...still completely new to the compiler 😄 |
So the warning is here: rust/src/librustc_driver/driver.rs Line 1275 in 6cc49e5
RIght now we warn if the number of unnamed output types is more than one. The actual condition is "if the number of output types is more than one AND if one of the unnamed emit options is The emit options are stored in a hashmap in Something like |
Warn that the link target ignores the given name Hi, new contributor here. This is my stab at #20130, any feedback welcome!
I believe this issue is resolved. See #38840 . |
Although compiler warns that output filename was ignored, only the
link
target ignores it. All other targets generate file with provided output filename.The text was updated successfully, but these errors were encountered: