[Driver] Set default sysroot for Fuchsia if none is specified
Needs ReviewPublic

Authored by phosek on Jan 12 2018, 4:18 PM.

Details

Reviewers
mcgrathr
Summary

When sysroot isn't explicitly set, try to use the default location which is <driver path>/../<triple>

Diff Detail

Repository
rC Clang
phosek created this revision.Jan 12 2018, 4:18 PM
mcgrathr added inline comments.Jan 12 2018, 4:58 PM
lib/Driver/ToolChains/Fuchsia.cpp
152

The GCC behavior (if --with-sysroot is given to configure) is tooldir/sys-root, not tooldir itself.

phosek added inline comments.Jan 22 2018, 8:22 PM
lib/Driver/ToolChains/Fuchsia.cpp
152

That's fine with me, although I'm not very fond of the sys-root since it's typically spelled as sysroot everywhere else, but I could be convinced if we want to be consistent with GCC.