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

Diff Detail

Repository
rL LLVM

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 ↗(On Diff #123167)

Can't you just add case OPT_sysroot here?

168 ↗(On Diff #123167)

Indentation?

arichardson marked 2 inline comments as done.Nov 17 2017, 6:03 AM
arichardson added inline comments.
ELF/DriverUtils.cpp
163 ↗(On Diff #123167)

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 ↗(On Diff #123167)

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.