MinGW and CrossWindows crash if the target is an unsupported target architecture.
Changed it to emit an error message.
Details
Diff Detail
Event Timeline
Thank you for this fix. Can you please add a summary in the details explaining the motivation for this fix and a link to the github bug report as well.
Sorry, I am not familiar at all with this code. Perhaps @shafik could suggest more appropriate reviewers
I think the code changes make sense; these are trivial to hit by a user, so they shouldn't be llvm_unreachable.
clang/test/Driver/unsupported-target-arch.c | ||
---|---|---|
33 | Separate side note; the suggested option -triple isn't really a clang driver level option, and -arch is only relevant for darwin targets (AFAIK) - so maybe the error message text should be revised? |
LGTM. If you don’t have commit access, please say your preferred git author name for the commit, i.e. Real Name <email@address>.
I don't have commit access.
Please commit at KOMATA Manabu <k-mana@mve.biglobe.ne.jp>.
Looks great!
clang/test/Driver/unsupported-target-arch.c | ||
---|---|---|
33 | The part ", please use -triple or -arch" is almost always wrong. For cc1, the error is due to a specified but unknown -triple, we should not suggest specifying -triple. I just removed the hint from the diagnostic. |
clang/test/Driver/unsupported-target-arch.c | ||
---|---|---|
33 | -arch is a driver option, for darwin targets though. But I agree that it's probably best to leave it out since it's more misleading than helping here (and -triple is indeed not a relevant option here). |
Separate side note; the suggested option -triple isn't really a clang driver level option, and -arch is only relevant for darwin targets (AFAIK) - so maybe the error message text should be revised?