Page MenuHomePhabricator

[lldb] [lit] Fix finding lld-link when it is not in 'compiler dir'

Authored by mgorny on Feb 9 2019, 6:33 AM.



Fix the build helper to find lld-link via PATH lookup, rather than
making a fragile assumption that it will be present in the 'compiler
directory'. This fixes tests on Gentoo where clang and lld
are installed in different directories.

Event Timeline

mgorny created this revision.Feb 9 2019, 6:33 AM
labath added inline comments.Feb 11 2019, 2:01 AM
291–295 ↗(On Diff #186205)

How about we replace all of this with a call like linker_path = find_executable(name, [compiler_dir] + search_paths) ?

294–296 ↗(On Diff #186205)

find_executable returns None on failure, so this needs to be adjusted.

mgorny marked 2 inline comments as done.Feb 11 2019, 2:26 AM
mgorny updated this revision to Diff 186205.Feb 11 2019, 2:38 AM

Updated to use find_executable() unconditionally.

labath accepted this revision.Feb 11 2019, 5:42 AM


296 ↗(On Diff #186205)

linker_path isn't going to be terribly useful here when it's none. Probably just replace it with name.

This revision is now accepted and ready to land.Feb 11 2019, 5:42 AM
mgorny marked 2 inline comments as done.Feb 11 2019, 6:08 AM
mgorny added inline comments.
296 ↗(On Diff #186205)

Indeed, thanks for catching this.

This revision was automatically updated to reflect the committed changes.
mgorny marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2019, 6:09 AM