This matches how it is set by default in current master versions.
This requires building a version that includes
https://reviews.llvm.org/D89863, otherwise the new/delete operators
aren't properly weak.
This used to be the default before, but has changed in the
latest master version of libcxx.
Previously, both libcxx and libcxxabi enabled it by default, but
we used to explicitly disable it on the libcxxabi side (and rely
on the default for libcxx). Instead explicitly set the intended
configuration state for both parts.
This is necessary since 8bc62db27244803 (Jun 26, 2020) in llvm-project.
Also setting it for libcxxabi and libunwind, in case it becomes
needed there as well.
For build-mingw-w64.sh to succeed when installing to such a path,
the mingw-w64 version has to be updated to the latest git master.
build-mingw-w64-libraries.sh still fails in this case, as libtool
fails to properly quote $LD in a test for whether the linker is GNU ld.
Since the default _WIN32_WINNT now is for Windows 7, psapi.h
redirects to PSAPI version 2, which is available in kernel32.dll
with a "K32" prefix on the function names (K32EnumProcessModules).
This updates compiler-rt, libunwind, libcxxabi and libcxx to a newer
version, matching the compiler.
This will be the official, canonical repo in the future.
For the non-dev Dockerfile build, this means that all the llvm based
subprojects need to be built in one RUN to avoid storing the llvm
checkout in the docker layers.
The checks behind LLVM_COMPILER_CHECKED fail if there's no libc++
available for linking.
This fixes building libunwind/libcxxabi/libcxx with newer versions
of llvm, if the llvm installation isn't stripped.
Some libcxxabi source files define _LIBCPP_BUILDING_LIBRARY themselves.
A "#define FOO" in a file defines it to "", while "-DFOO" on the command
line defines it to "1". Define it on the command line using "-DFOO=" to
make it match the #define within the source files.
This reverts commit 92f301f775.
With the latest versions of libunwind and libcxxabi, the -w option
for suppressing compiler warnings isn't added any longer when building
with the llvm cmake files available.
The DLL build fails since we stopped setting LIBCXX_ABI_UNSTABLE=TRUE,
if the tests are enabled (which they are if building against a
non-stripped llvm installation).
This didn't seem to actually be necessary, not even in the initial
commit adding support for building a DLL of libcxx. It might have
been necessary at some earlier point while working on building a DLL.
This is set via a cmake option when building libcxx, but libcxxabi
uses the raw libcxx headers from its include directory before they
are installed.
This fixes cases of inconsistent classes seen while compiling libcxxabi
and libcxx. With potential future patches to clang to adjust how
classes are exported with dllexport, this change is needed to avoid
conflicts.
If the triplet directory is wiped and only the build-mingw-w64.sh
step is rerun, the bin subdirectory would be missing, ending up
with a file named "bin", which actually was the libc++ DLL.
This fixes potential pointer truncation on 64 bit windows.
(Existing tests have ran fine in practice; either these are codepaths
not exercised in current setups, or potential codepaths that could
be triggered with more extensive tests.)