For compiler-rt and libunwind, this makes them build successfully even
if llvm-config and the llvm cmake files aren't available.
For libcxxabi, this brings in support for using SEH exceptions.
For libcxx, this removes a few build time warnings.
When using a global C++ object, the destructor isn't handled via
the .dtors section, but the destructor is set up with atexit() once
the constructor has been called.
For x86 architectures, binutils objcopy and strip can be used as
such.
For armv7 and aarch64, binutils doesn't recognize the architectures
and refuse to touch the files. For most/everything that objcopy/strip
do, the actual architecture doesn't really matter though. Therefore,
provide a wrapper script and a minimal tool for editing PE executables,
that change the architecture from armv7 and aarch64 to i686 and x86_64
respectively before invoking binutils, and change it back afterwards.
In case the binutils tools are missing, just return a successful result
without doing anything for stripping operations (previously, we had the
<triplet>-strip tool symlinked to /bin/true, so this isn't any worse than
before) and fail for other objcopy operations.
This allows using GNU binutils strip and objcopy on executables with
dwarf debug info linked by lld.
This also improves clang's handling of detecting known libraries
that override default libraries to link.
This version includes the windows api sets version of the universal
crt, fixes a few other functions when used with the universal crt,
and fixes the widl tool when running on macos.
If installing on top of a prebuilt win32 release of llvm instead of
building from source, the nm and strings executables are missing,
and MSYS2 errors out when creating a symlink to a file that doesn't
exist (since it does a copy instead of making an actual symlink).
This fixes an issue with code generation for functions that needed
a stack probe on armv7, improves llvm-rc and adds a few more options
to the mingw lld frontend.
This fixes building resource files that refer to external files
relative to the source directory, without specifying any directory
via include flags to windres itself. This is needed since llvm-rc
doesn't see the original source file but only sees the preprocessed
one in a temporary directory.
Alternatively, the preprocessed file could be placed in the same
directory as the source file, but when building e.g. outside of the
source tree, writing files (even temporary ones) inside the source
tree isn't generally expected.
This version improves llvm-rc to support more rc script features
and features built-in filtering of CPP output in llvm-rc. It also
improves the handling of some def features in llvm-dlltool, allows
producing codeview debug information when targeting mingw and adds
handling of a few more ARM64 relocations in lld.
This avoids needing the clang++ symlink. On platforms without symlinks
(i.e. windows), clang.exe and clang++.exe are two separate but identical
executables. This allows getting rid of the latter, saving size.
When building libcxx, this is also already enabled via the cmake
option -DLIBCXX_HAS_WIN32_THREAD_API=ON.
This fixes building libcxxabi if pthreads are available.