diff options
| author | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-11-18 18:21:06 +0000 | 
|---|---|---|
| committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-11-18 18:21:06 +0000 | 
| commit | 865a671fa2b828ceaed5b81b340d749a798253e4 (patch) | |
| tree | e753c407cf5776db9af93296eec895035f325ad0 /compiler-rt/lib/builtins/gcc_personality_v0.c | |
| parent | e4b9fd985214456ac9597567868da124d0b8d85d (diff) | |
| download | bcm5719-llvm-865a671fa2b828ceaed5b81b340d749a798253e4.tar.gz bcm5719-llvm-865a671fa2b828ceaed5b81b340d749a798253e4.zip | |
builtins: repair the builtins build with clang 3.8
When the C unwinding personality was corrected to match the ARM EHABI
specification, the unwind header in clang was updated with necessary
declarations.  However, when building with an older compiler, we would not have
the necessary declarations.  This would result in a build failure.  Provide a
supplementary header to ensure that the necessary declarations are present for
the build of the C unwinding personality.
Note that this is NOT an ABI break.  It merely is a compile time failure due to
the constants not being present.  The constants here are reproduced
equivalently.  This header should permit building with clang[<3.9] as well as
gcc.
Addresses PR31035!
llvm-svn: 287359
Diffstat (limited to 'compiler-rt/lib/builtins/gcc_personality_v0.c')
| -rw-r--r-- | compiler-rt/lib/builtins/gcc_personality_v0.c | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/compiler-rt/lib/builtins/gcc_personality_v0.c b/compiler-rt/lib/builtins/gcc_personality_v0.c index 29e5be30712..0bc76562456 100644 --- a/compiler-rt/lib/builtins/gcc_personality_v0.c +++ b/compiler-rt/lib/builtins/gcc_personality_v0.c @@ -12,6 +12,17 @@  #include "int_lib.h"  #include <unwind.h> +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) && !defined(__USING_SJLJ_EXCEPTIONS__) +/* + * When building with older compilers (e.g. clang <3.9), it is possible that we + * have a version of unwind.h which does not provide the EHABI declarations + * which are quired for the C personality to conform to the specification.  In + * order to provide forward compatibility for such compilers, we re-declare the + * necessary interfaces in the helper to permit a standalone compilation of the + * builtins (which contains the C unwinding personality for historical reasons). + */ +#include "unwind-ehabi-helpers.h" +#endif  /*   * Pointer encodings documented at: | 

