This includes support for a -fdwarf-exceptions flag in clang,
allowing to choose that exception handling model on architectures
where it isn't the default.
This avoids having to manually add -lpsapi when linking in libc++.a.
This requires using a new script to merge libraries using ar -M
with a small MRI script.
The script merge_archives.py in libcxx does the merge by manually
extracting all object files and creating a new archive out of them.
The import libraries created by LLVM have more than one object file
with the same file name (just like MSVC tools do), so extracting
them doesn't work as intended - but merging using a MRI script works.
This is the correct layering/ordering.
This requies setting forcing CXX_SUPPORTS_CXX11=TRUE in cmake,
since it tries linking to see whether the C++ environment works,
but we haven't built libcxx yet.
Manually add the libcxx include directory to the include path
(since libunwind does use some C++ headers but doesn't require
linking to C++ libraries).
Dwarf is also the default in clang on i686, but libunwind currently
has an issue relating to unwinding dwarf exceptions on i686 on
windows (and less easily reproducible on other platforms),
see https://reviews.llvm.org/D38680.
This enables exceptions on aarch64, where they previously were
avoided/disabled.
When linking to a statically linked libunwind with support for
dwarf, one (currently) has to link in -lpsapi.
This actually gets set by default by the installed config headers,
depending on how the libraries were configured.
Also, the -Xclang -flto-visibility-public-std workaround doesn't
seem to be necessary while building these test apps (but it might
potentially be necessary if building more complicated apps).
This requires manually enabling sjlj exceptions, since libunwind
doesn't support the other exception handling mechanisms on windows
(yet).
Don't enable exceptions on aarch64 yet, since no exception handling
mechanism is implemented for windows on aarch64 yet.
These versions contain fixes relevant to mingw/clang.
Do the svn rebase (only necessary for getting sensible llvm/clang
version numbers in clang --version) before checking out the specific
version, otherwise we always end up at the latest master version.
llvm and clang have got new patches that are relevant for mingw
and arm64/win.
compiler-rt has changed things, so we can't ask it to build builtins
for i686 any longer, but need to request it for i386 instead - and
clang will expect it to be named i386 even though we're invoking it
with an i686 target.