[Lldb-commits] [PATCH] D17750: arm ios doesn't have elf.h, sys/procfs.h, need to avoid including them on apple systems

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 29 21:35:14 PST 2016


jasonmolenda created this revision.
jasonmolenda added reviewers: tberghammer, omjavaid.
jasonmolenda added a subscriber: lldb-commits.
jasonmolenda set the repository for this revision to rL LLVM.
Herald added subscribers: rengolin, aemerson.

I'm getting lldb to build for ios again and had build failures with NativeRegisterContextLinux_arm.cpp and Linux/Procfs.h which assume they're building for linux when being built or aarch64/etc.  

Would some patch like this be acceptable?  It's not pretty, but that's always the way with the C preprocessor as we pile on conditionals. :)

Repository:
  rL LLVM

http://reviews.llvm.org/D17750

Files:
  source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
  source/Plugins/Process/Linux/Procfs.h

Index: source/Plugins/Process/Linux/Procfs.h
===================================================================
--- source/Plugins/Process/Linux/Procfs.h
+++ source/Plugins/Process/Linux/Procfs.h
@@ -26,6 +26,8 @@
 #endif // NT_FPREGSET
 #endif
 #else  // __ANDROID__
+#if !defined (__APPLE__)
 #include <sys/procfs.h>
+#endif // __APPLE__
 #endif // __ANDROID__
 
Index: source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
===================================================================
--- source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
+++ source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
+#if !defined (__APPLE__) && (defined(__arm__) || defined(__arm64__) || defined(__aarch64__))
 
 #include "NativeRegisterContextLinux_arm.h"
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17750.49450.patch
Type: text/x-patch
Size: 956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160301/4517c6dd/attachment.bin>


More information about the lldb-commits mailing list