[PATCH] D42702: Fix llvm-config --system-libs output on FreeBSD and NetBSD

Dimitry Andric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 11:33:04 PST 2018


dim added a comment.

Hmm, apparently CMake *always* returns a full path for `find_library()`, but we seem to ignore those, by doing (for example in libclang's CMakeLists.txt):

  find_library(DL_LIBRARY_PATH dl)
  if (DL_LIBRARY_PATH)
    list(APPEND LIBS dl)
  endif()

The `FindBacktrace.cmake` module is a little different, though, since it can return either a custom define, an empty string, or either of `libexecinfo` or `libbacktrace`, depending on the OS.

Translating this into a `-l` option must probably be done manually, and it is likely better to do it in `lib/Support/CMakeLists.txt`, or even `cmake/config-ix.cmake`.  Any suggestions?


Repository:
  rL LLVM

https://reviews.llvm.org/D42702





More information about the llvm-commits mailing list