forked from oscar-system/libsingular-julia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xcode_jlcxx_workaround.h
29 lines (24 loc) · 963 Bytes
/
xcode_jlcxx_workaround.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef XCODE_JLCXX_WORKAROUND
#define XCODE_JLCXX_WORKAROUND
// This must be the very first include
#ifdef _LIBCPP_CONFIG
#error This header must be included before any system headers!
#endif
// Work around Xcode 11.4 issue until upstream libc++ fix arrives in Xcode:
// https://github.com/llvm/llvm-project/commit/2464d8135e
//
// First include __config from libc++, then override typeinfo flag
// to force use of address as hash instead of hashing the string.
#if defined(__APPLE__) && defined(FORCE_XCODE_TYPEINFO_MERGED)
#include <__config>
#if defined(_LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT) && \
_LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT == 0
#undef _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT
#define _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT 1
#else
#error Trying to work around Xcode 11.4 bug but libc++ macro not set as expected! \
Please try rebuilding and create an issue if this reappears.
#endif
#endif
#include "jlcxx/jlcxx.hpp"
#endif