This is an archive of the discontinued LLVM Phabricator instance.

libunwind cannot be used in C programs due to __cxxabi_config.h include
Needs RevisionPublic

Authored by iid_iunknown on May 21 2015, 10:25 AM.

Details

Reviewers
compnerd
asl
Summary

Hello,

The public libunwind's headers include <__cxxabi_config.h> that is installed into C++ headers directory.
libunwind.h / unwind.h cannot be used from C code for this reason.

The patch introduces libunwind specific <libunwind_config.h> header instead and removes dependency on <__cxxabi_config.h>.

Diff Detail

Repository
rL LLVM

Event Timeline

iid_iunknown retitled this revision from to libunwind cannot be used in C programs due to __cxxabi_config.h include.
iid_iunknown updated this object.
iid_iunknown edited the test plan for this revision. (Show Details)
iid_iunknown added a reviewer: compnerd.
iid_iunknown set the repository for this revision to rL LLVM.
iid_iunknown added a subscriber: Unknown Object (MLST).
asl added a subscriber: asl.May 23 2015, 6:56 PM
asl added inline comments.
include/libunwind_config.h
15

Should we use LIBUNWIND_ARM_EHABI here and everywhere below?

iid_iunknown added inline comments.May 27 2015, 1:40 PM
include/libunwind_config.h
15

Yes, this sounds reasonable.
However, my thought behind leaving it same-named is that if anyone decides to change the conditions when LIBCXXABI_ARM_EHABI is defined, it could be helpful to see the change can and should affect libunwind, since the meaning of LIBCXXABI_ARM_EHABI and LIBUNWIND_ARM_EHABI is the same. One will find all the dependent logic by searching the code for LIBCXXABI_ARM_EHABI.

Please let me know if the name is to be changed anyway.

Were you able to review this?
Thanks.

compnerd edited edge metadata.Jul 22 2015, 8:56 AM

Isn't this obsoleted by the change which Logan made a few days ago?

asl requested changes to this revision.Jul 22 2015, 9:10 AM
asl added a reviewer: asl.
This revision now requires changes to proceed.Jul 22 2015, 9:10 AM
emaste added a subscriber: emaste.Aug 13 2015, 1:00 PM