Page MenuHomePhabricator

arm ios doesn't have elf.h, sys/procfs.h, need to avoid including them on apple systems
AbandonedPublic

Authored by jasonmolenda on Feb 29 2016, 9:35 PM.

Details

Summary

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. :)

Diff Detail

Repository
rL LLVM

Event Timeline

jasonmolenda retitled this revision from to arm ios doesn't have elf.h, sys/procfs.h, need to avoid including them on apple systems.
jasonmolenda updated this object.
jasonmolenda added reviewers: tberghammer, omjavaid.
jasonmolenda set the repository for this revision to rL LLVM.
jasonmolenda added a subscriber: lldb-commits.
labath requested changes to this revision.Mar 1 2016, 1:35 AM
labath added a reviewer: labath.
labath added a subscriber: labath.

The actual changes aren't too bad, but I wonder why you need to add them at all. These files all assume they will be running on a linux host (they are a part of lldb-server), and they will not do anything useful even if you can get them to compile. I am not sure what is the state of the xcode build, but in cmake we don't even compile the whole folder on other platforms (see source/Plugins/Process/CMakeLists.txt). I wonder if you should do the same for your build system (?)

This revision now requires changes to proceed.Mar 1 2016, 1:35 AM

Good point. Let me play with the xcode project file (which I was using to do the build) tomorrow; your solution may be the correct one, we might have some files being built unnecessarily.

jasonmolenda abandoned this revision.Mar 1 2016, 8:21 PM

Yes, taking the source/Plugins/Process/Linux directory out of the xcodeproject file altogether makes this build on ios, I'll go with that approach.