This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Fix libcxx detection on Darwin with clang run as ./clang
ClosedPublic

Authored by ilya-biryukov on Jan 8 2019, 10:09 AM.

Details

Summary

By using '..' instead of fs::parent_path.

The intention of the code was to go from 'path/to/clang/bin' to
'path/to/clang/include'. In most cases parent_path works, however it
would fail when clang is run as './clang'.

This was noticed in Chromium's bug tracker, see
https://bugs.chromium.org/p/chromium/issues/detail?id=919761

Diff Detail

Repository
rC Clang

Event Timeline

ilya-biryukov created this revision.Jan 8 2019, 10:09 AM
arphaman accepted this revision.Jan 8 2019, 10:32 AM

That makes sense, LGTM. Thanks!

This revision is now accepted and ready to land.Jan 8 2019, 10:32 AM
thakis accepted this revision.Jan 8 2019, 10:37 AM
thakis added a comment.Jan 9 2019, 4:43 AM

…can you land this? :-)

This revision was automatically updated to reflect the committed changes.

Sorry about the delay.