[llvm-branch-commits] [lldb] r374511 - [lldb][cmake] Fix build with GCC 4.8 and wchar-enabled libedit

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Oct 10 21:56:54 PDT 2019


Author: tstellar
Date: Thu Oct 10 21:56:54 2019
New Revision: 374511

URL: http://llvm.org/viewvc/llvm-project?rev=374511&view=rev
Log:
[lldb][cmake] Fix build with GCC 4.8 and wchar-enabled libedit

Fixes PR43229.

Patch By:  Joseph Tremoulet

Modified:
    lldb/branches/release_90/cmake/modules/LLDBConfig.cmake

Modified: lldb/branches/release_90/cmake/modules/LLDBConfig.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_90/cmake/modules/LLDBConfig.cmake?rev=374511&r1=374510&r2=374511&view=diff
==============================================================================
--- lldb/branches/release_90/cmake/modules/LLDBConfig.cmake (original)
+++ lldb/branches/release_90/cmake/modules/LLDBConfig.cmake Thu Oct 10 21:56:54 2019
@@ -1,3 +1,4 @@
+include(CheckIncludeFileCXX)
 include(CheckCXXSymbolExists)
 include(CheckTypeSize)
 
@@ -94,10 +95,14 @@ else()
   find_package(LibEdit REQUIRED)
 
   # Check if we libedit capable of handling wide characters (built with
-  # '--enable-widec').
+  # '--enable-widec'), and have the <codecvt> standard library we use to
+  # process them.
   set(CMAKE_REQUIRED_LIBRARIES ${libedit_LIBRARIES})
   set(CMAKE_REQUIRED_INCLUDES ${libedit_INCLUDE_DIRS})
-  check_symbol_exists(el_winsertstr histedit.h LLDB_EDITLINE_USE_WCHAR)
+  check_symbol_exists(el_winsertstr histedit.h HAVE_WIDEC_LIBEDIT)
+  if (HAVE_WIDEC_LIBEDIT)
+    check_include_file_cxx(codecvt LLDB_EDITLINE_USE_WCHAR)
+  endif()
   set(CMAKE_EXTRA_INCLUDE_FILES histedit.h)
   check_type_size(el_rfunc_t LLDB_EL_RFUNC_T_SIZE)
   if (LLDB_EL_RFUNC_T_SIZE STREQUAL "")




More information about the llvm-branch-commits mailing list