Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upMultiple emit targets don’t ignore `-o` option, contrary to the warning #20130
Comments
kmcallister
added
A-diagnostics
A-driver
E-easy
labels
Jan 16, 2015
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
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? |
This comment has been minimized.
This comment has been minimized.
|
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 comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
My thinking is the same as @brson's, the intended operation is something like:
The |
This comment has been minimized.
This comment has been minimized.
|
I submitted a rust-lang/rfcs#595 regarding this. |
This comment has been minimized.
This comment has been minimized.
|
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? |
brson
added
the
rust-2-breakage-wishlist
label
Jun 27, 2016
This comment has been minimized.
This comment has been minimized.
|
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. |
Manishearth
added
the
E-mentor
label
Jun 28, 2016
This comment has been minimized.
This comment has been minimized.
|
Willing to help anyone who wants to work on this |
This comment has been minimized.
This comment has been minimized.
|
Ya I'd take it |
This comment has been minimized.
This comment has been minimized.
|
@hgallagher1993 You got it! |
This comment has been minimized.
This comment has been minimized.
|
@hgallagher1993 How's it going? |
This comment has been minimized.
This comment has been minimized.
|
@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 |
This comment has been minimized.
This comment has been minimized.
|
OK, thanks for the status update! |
This comment has been minimized.
This comment has been minimized.
|
@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 |
This comment has been minimized.
This comment has been minimized.
|
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 |
hgallagher1993
referenced this issue
Aug 17, 2016
Closed
Changed warning when number of output types is more than 1 and 1 outp… #35717
kjaleshire
referenced this issue
Jan 5, 2017
Merged
Warn that the link target ignores the given name #38840
bors
added a commit
that referenced
this issue
Jan 9, 2017
This comment has been minimized.
This comment has been minimized.
|
I believe this issue is resolved. See #38840 . |
nagisa commentedDec 22, 2014
Although compiler warns that output filename was ignored, only the
linktarget ignores it. All other targets generate file with provided output filename.