This is an archive of the discontinued LLVM Phabricator instance.

[ELF2] Add --sysroot command line switch
ClosedPublic

Authored by ikudrin on Sep 28 2015, 5:59 AM.

Diff Detail

Event Timeline

ikudrin updated this revision to Diff 35854.Sep 28 2015, 5:59 AM
ikudrin retitled this revision from to [ELF2] Add --sysroot command line switch.
ikudrin updated this object.
ikudrin added reviewers: rafael, ruiu.
ikudrin added a project: lld.
ikudrin added a subscriber: llvm-commits.
ruiu added inline comments.Sep 28 2015, 6:37 AM
ELF/Config.h
23

In the GNU ld manual, sysroot is used as a single word, so I'd name it Sysroot.

ELF/Driver.cpp
66–67

I'm generally not happy about the use of SmallString in sys::path. It seems to be able to be replaced by std::string without noticeable performance penalty. At least we don't need any speed here. Can you return std::string from this function to make this function functional?

ikudrin updated this revision to Diff 35869.Sep 28 2015, 7:52 AM
  • SysRoot -> Sysroot
  • Made the buildSysrootedPath function functional
ikudrin marked 2 inline comments as done.Sep 28 2015, 7:53 AM
ruiu accepted this revision.Sep 28 2015, 7:59 AM
ruiu edited edge metadata.

LGTM

This revision is now accepted and ready to land.Sep 28 2015, 7:59 AM
ikudrin closed this revision.Sep 28 2015, 8:03 AM
emaste added a subscriber: emaste.Sep 28 2015, 8:44 AM