This is an archive of the discontinued LLVM Phabricator instance.

Report original emulation name in "unknown emulation" error
ClosedPublic

Authored by emaste on Sep 8 2016, 10:59 AM.

Details

Summary

We strip a trailing _fbsd from emulation names, but if the result is not a valid emulation the error was somewhat confusing:

% ld.lld -m elf_amd64_fbsd
unknown emulation: elf_amd64

Use the unmodified emulation name in error messages.

Diff Detail

Repository
rL LLVM

Event Timeline

emaste updated this revision to Diff 70727.Sep 8 2016, 10:59 AM
emaste retitled this revision from to Report original emulation name in "unknown emulation" error.
emaste updated this object.
emaste added reviewers: ruiu, rafael, davide.
emaste added a project: lld.
emaste added a subscriber: llvm-commits.
davide accepted this revision.Sep 8 2016, 11:04 AM
davide edited edge metadata.

This is OK too. Please wait on Rui on this one as he might have some opinions on the variable name.
FWIW, Emul is fine by me.

This revision is now accepted and ready to land.Sep 8 2016, 11:04 AM

Also, do you mind to add a test that exercises the following behaviour?

ruiu accepted this revision.Sep 8 2016, 11:05 AM
ruiu edited edge metadata.

LGTM

emaste updated this revision to Diff 70739.Sep 8 2016, 12:35 PM
emaste edited edge metadata.

Update an existing "unknown emulation" test to verify this change

This revision was automatically updated to reflect the committed changes.