This is an archive of the discontinued LLVM Phabricator instance.

Find clang resource directory via *nix-style lookup
ClosedPublic

Authored by beanz on Oct 31 2016, 3:58 PM.

Details

Summary

This patch allows the Darwin build to fall back to to Posix-style lookups for the clang resource directory if the debugger library isn't inside a framework.

The patch also includes a bit of refactoring and cleanup around the *nix resolution of the binary and lib directories to reuse the code instead of duplicating it.

With this patch Darwin builds that don't build a framework only have 3 failing tests on my system (TestExec.py).

Diff Detail

Repository
rL LLVM

Event Timeline

beanz updated this revision to Diff 76496.Oct 31 2016, 3:58 PM
beanz retitled this revision from to Find clang resource directory via *nix-style lookup.
beanz updated this object.
beanz added reviewers: zturner, labath, spyffe, tfiala.
beanz added a subscriber: lldb-commits.
tfiala accepted this revision.Oct 31 2016, 5:45 PM
tfiala edited edge metadata.

Looks reasonable.

source/Host/macosx/HostInfoMacOSX.mm
235–239 ↗(On Diff #76496)

We should have a const in place of the two uses of "LLDB.framework", but that can be a separate cleanup.

This revision is now accepted and ready to land.Oct 31 2016, 5:45 PM
labath edited edge metadata.Nov 1 2016, 3:36 AM

looks good in general, but please check whether this is correct with LLVM_LIBDIR_SUFFIX=64.

source/Host/posix/HostInfoPosix.cpp
176 ↗(On Diff #76496)

I think you need to include the LLVM_LIBDIR_SUFFIX here. At least that's what the usage of this directory in source/API/CMakeLists.txt leads me to believe.

This revision was automatically updated to reflect the committed changes.