llvm.org GIT mirror llvm / 367ed08
Fix LLDB Android AArch64 GCC debug info build Committing after fixing suggested changes and tested release/debug builds on x86_64-linux and arm/aarch64 builds. Differential revision: https://reviews.llvm.org/D29042 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293850 91177308-0d34-0410-b5e6-96231b3b80d8 Omair Javaid 3 years ago
4 changed file(s) with 6 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
226226 list(APPEND CMAKE_REQUIRED_LIBRARIES dl)
227227 endif()
228228 check_symbol_exists(dlopen dlfcn.h HAVE_DLOPEN)
229 check_symbol_exists(dladdr dlfcn.h HAVE_DLADDR)
229230 if( HAVE_LIBDL )
230231 list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES dl)
231232 endif()
5050 /* Define if dlopen() is available on this platform. */
5151 #cmakedefine HAVE_DLOPEN ${HAVE_DLOPEN}
5252
53 /* Define if dladdr() is available on this platform. */
54 #cmakedefine HAVE_DLADDR ${HAVE_DLADDR}
55
5356 /* Define to 1 if you have the header file. */
5457 #cmakedefine HAVE_ERRNO_H ${HAVE_ERRNO_H}
5558
179179 if (getprogpath(exe_path, argv0))
180180 return exe_path;
181181 }
182 #elif defined(HAVE_DLFCN_H)
182 #elif defined(HAVE_DLFCN_H) && defined(HAVE_DLADDR)
183183 // Use dladdr to get executable path if available.
184184 Dl_info DLInfo;
185185 int err = dladdr(MainAddr, &DLInfo);
411411
412412 if (printSymbolizedStackTrace(Argv0, StackTrace, depth, OS))
413413 return;
414 #if HAVE_DLFCN_H && __GNUG__ && !defined(__CYGWIN__)
414 #if HAVE_DLFCN_H && HAVE_DLADDR
415415 int width = 0;
416416 for (int i = 0; i < depth; ++i) {
417417 Dl_info dlinfo;