This is an archive of the discontinued LLVM Phabricator instance.

[libunwind] [CMake] Allow building standalone without any llvm-config available
ClosedPublic

Authored by mstorsjo on Aug 1 2018, 4:07 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Aug 1 2018, 4:07 AM
mstorsjo added a reviewer: rnk.Aug 2 2018, 1:12 PM
phosek added inline comments.Aug 2 2018, 1:23 PM
CMakeLists.txt
363 ↗(On Diff #158495)

libcxx seems to be using a different condition: IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test", should this be unified?

mstorsjo added inline comments.Aug 2 2018, 1:40 PM
CMakeLists.txt
363 ↗(On Diff #158495)

Maybe, but there's more to it than that. libunwind's test/CMakeLists.txt will unconditionally try to do include(AddLLVM), which fails if LLVM_CMAKE_PATH isn't set. libcxx's test/CMakeLists.txt on the other hand will only try to do that if LIBCXX_INCLUDE_TESTS is defined, which it isn't by default.

There's lots of the llvm/cmake handling that seems to be quite outdated in libunwind compared to libcxxabi/libcxx, but I'm not really volunteering to unify that...

rnk accepted this revision.Aug 2 2018, 5:40 PM

lgtm

This revision is now accepted and ready to land.Aug 2 2018, 5:40 PM
This revision was automatically updated to reflect the committed changes.