This is an archive of the discontinued LLVM Phabricator instance.

[cmake] [libunwind] Fix find_path() problems when cross compiling
ClosedPublic

Authored by hintonda on Dec 28 2017, 9:32 PM.

Details

Summary

When CMAKE_SYSROOT or CMAKE_FIND_ROOT_PATH is set, cmake
recommends setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
globally which means find_path() always prepends CMAKE_SYSROOT or
CMAKE_FIND_ROOT_PATH to all paths used in the search.

However, this find_path() invocation is looking for a path in the
libcxx project on the host system, not the target system,
which can be done by passing NO_CMAKE_FIND_ROOT_PATH.

Diff Detail

Repository
rL LLVM

Event Timeline

hintonda created this revision.Dec 28 2017, 9:32 PM
hintonda retitled this revision from [cmake] Fix path problems when cross compiling. to [cmake] [libunwind] Fix path problems when cross compiling..Dec 28 2017, 9:35 PM
compnerd requested changes to this revision.Dec 29 2017, 3:35 PM

Similar to the libc++abi and libc++ changes.

This revision now requires changes to proceed.Dec 29 2017, 3:35 PM
hintonda retitled this revision from [cmake] [libunwind] Fix path problems when cross compiling. to [cmake] [libunwind] Fix find_path() problems when cross compiling.Jan 22 2018, 10:54 AM
hintonda edited the summary of this revision. (Show Details)
This revision was not accepted when it landed; it landed in state Needs Revision.Jan 22 2018, 11:18 AM
This revision was automatically updated to reflect the committed changes.