Page MenuHomePhabricator

Add sysroot/lib to library search path of baremetal toolchain.
ClosedPublic

Authored by abidh on Nov 16 2020, 12:07 PM.

Details

Summary

Baremetal toolchain is not adding sysroot/lib to the library
search path. This is forcing the user to do it manually. This commit
fixes this shortcoming by adding the sysroot/lib to library search path
if sysroot is not empty.

Diff Detail

Event Timeline

abidh created this revision.Nov 16 2020, 12:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 16 2020, 12:07 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
abidh requested review of this revision.Nov 16 2020, 12:07 PM
jroelofs accepted this revision.Nov 16 2020, 12:14 PM
jroelofs added inline comments.
clang/lib/Driver/ToolChains/BareMetal.cpp
39

Is the explicit std::string ctor call necessary here? Since SmallString has an operator std::string() const, I think this can just be:

getFilePaths().push_back(SysRoot);
This revision is now accepted and ready to land.Nov 16 2020, 12:14 PM
abidh updated this revision to Diff 306036.Nov 18 2020, 3:35 AM

Handle review comment.

abidh marked an inline comment as done.Nov 18 2020, 3:38 AM
abidh added inline comments.
clang/lib/Driver/ToolChains/BareMetal.cpp
39

That operator is explicit. Although I noticed that I did not need the str() call.

This revision was automatically updated to reflect the committed changes.
abidh marked an inline comment as done.