This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Fix rewriting of --sysroot in reproducer tars
ClosedPublic

Authored by arichardson on Nov 16 2017, 5:51 AM.

Details

Summary

I noticed that the reproducers files I was getting from building CheriBSD
didn't work because the --sysroot option was not being rewritten. I've
updated the test to also verify that the rewritten path matches uses a
FileCheck capature instead of a {{.+}} regex

Event Timeline

arichardson created this revision.Nov 16 2017, 5:51 AM
ruiu added inline comments.Nov 16 2017, 7:42 PM
ELF/DriverUtils.cpp
163

Can't you just add case OPT_sysroot here?

168

Indentation?

arichardson marked 2 inline comments as done.Nov 17 2017, 6:03 AM
arichardson added inline comments.
ELF/DriverUtils.cpp
163

Indeed, that's much better. I didn't realize that lld also accepts --sysroot without the equals

arichardson marked an inline comment as done.
  • merged with the other cases
  • added both --sysroot=<path> and --sysroot <path> to the test
ruiu accepted this revision.Nov 17 2017, 9:19 PM

LGTM

ELF/DriverUtils.cpp
163

Please sort alphabetically.

This revision is now accepted and ready to land.Nov 17 2017, 9:19 PM
This revision was automatically updated to reflect the committed changes.