[COFF] Don't let /def override /out filename
ClosedPublic

Authored by rnk on Mar 20 2017, 3:02 PM.

Details

Summary

This also delays setting the output filename based on the first input
argument until after processing /def.

Fixes PR32354

Diff Detail

Repository
rL LLVM
rnk created this revision.Mar 20 2017, 3:02 PM
rnk edited the summary of this revision. (Show Details)Mar 20 2017, 3:02 PM
ruiu added a comment.Mar 20 2017, 3:15 PM

So the priority of inferring output path is the first object file name, a module definition file, or /out option, in increasing order of priority. I wonder if it is easier to parse arguments in this order and set Config->OutputPath uncoditionally.

rnk added a comment.Mar 20 2017, 3:19 PM

I think it would be better if Config->OutputFile is always either empty or the true final output name. Otherwise we might query it somewhere in the middle of options processing and get an incorrect value.

rnk added a comment.Mar 20 2017, 5:17 PM

I'm going to go ahead and land this to try to green the Chromium bots. We can reorganize later if we like.

This revision was automatically updated to reflect the committed changes.