Commit b4c37821 authored by Caleb Marchent's avatar Caleb Marchent Committed by Facebook Github Bot

Back out "[folly][PR] [CMake] Generalize include path for dwarf.h"

Summary:
Original commit changeset: 6b5faf000e5f

Breaks builds on Ubuntu Bionic, effectivly undoing the work of D3878961.
Note: both autotools and CMake builds incorrect on Bionic, its just that
autotools build fails explicitly where CMake fails silently; failing to
detect a correctly installed libdwarf headers. The difference being that
CMake does not build symbolizer.

Reviewed By: yfeldblum

Differential Revision: D9194639

fbshipit-source-id: c6798a0672195a70ced4898535f2f932018224d5
parent 24024c41
find_path(LIBDWARF_INCLUDE_DIR NAMES dwarf.h)
find_path(LIBDWARF_INCLUDE_DIR NAMES libdwarf/dwarf.h)
mark_as_advanced(LIBDWARF_INCLUDE_DIR)
find_library(LIBDWARF_LIBRARY NAMES dwarf)
......
......@@ -128,7 +128,7 @@ endif()
find_package(LibDwarf)
list(APPEND FOLLY_LINK_LIBRARIES ${LIBDWARF_LIBRARIES})
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBDWARF_INCLUDE_DIRS})
CHECK_INCLUDE_FILE_CXX(dwarf.h FOLLY_HAVE_LIBDWARF_DWARF_H)
CHECK_INCLUDE_FILE_CXX(libdwarf/dwarf.h FOLLY_HAVE_LIBDWARF_DWARF_H)
find_package(Libiberty)
list(APPEND FOLLY_LINK_LIBRARIES ${LIBIBERTY_LIBRARIES})
......
......@@ -18,7 +18,11 @@
#include <type_traits>
#include <dwarf.h>
#if FOLLY_HAVE_LIBDWARF_DWARF_H
#include <libdwarf/dwarf.h>
#else
#include <dwarf.h> // @manual
#endif
namespace folly {
namespace symbolizer {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment