This is needed since 8bd2722f65cfd7883ed9769f7bad3ff50e4c6905
(and 8e11bede3a6ac11ebcc05c82fac39899feaf9534) in llvm-project
(past the 12.x release branch), which will allow us to get rid of the
whole arch renaming part (once we can assume we're building a version
newer than that).
The dockerfiles install both tools, and the scripts that use them
(build-make.sh and build-libssp.sh) can make do with either curl
or wget, but e.g. macOS ships with curl but not wget.
Printing '<triple>' causes the shell to try to read a file named
triple. One could either quote it, or just remove the angle brackets;
removing the brackets for simplicity.
Having less available should make debugging in the docker images a bit
more accessible.
Curl is a nice-to-have at the moment, while we also have wget available
from before.
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.
LLVM's OpenMP implementation only supports Windows on x86, and it
requires a MASM-compatible assembler to build it. Build UASM
for this purpose, for now. (UASM isn't available packaged in
debian/ubuntu repos.) In the future, llvm-ml should be able
to handle it instead, but it's not currently mature enough.
Not including it in the regular build-all.sh for now, as UASM
isn't generally available.
Also flush after each printout, since not all configurations (in
particular, wine) flush stderr implicitly.
This is often useful when debugging unwinding.
Notable changes since LLVM 10.0.0:
- Enable -mms-bitfields by default (like GCC), don't produce errors
if the -mms-bitfields option is used together with non-trivial C++
classes
- Support for more linker flags in LLD (--disable-auto-import,
--disable-runtime-pseudo-reloc, --file-alignment, --section-alignment),
and fixed the handling of the --no-seh flag
- Clearly error out on unsupported relocation types in aarch64 assembly
- Proper support for __attribute__((weak))
- Minor improvements to details in llvm-rc
- Fixed a regression in LLD about exporting symbols containing periods ('.')
with a def file
If llvm is built with build-llvm.sh --full-llvm, we need to remove
this directory to end up with the same set of installed files as if
without --full-llvm, after stripping the install.
Our pinned version of mingw-w64 is new enough already, and
latest wine has implemented __C_specific_handler for aarch64,
so this makes the test be bypassed with current pinned clang (10.0.0)
and the soon to be released clang 11.0.0, but is executed with
clang 12.0.0 (where current versions has got this implemented properly).
This simplifies build-mingw-w64.sh. When building on native
windows (where we also provide unprefixed tools, we can't have
the yet incomplete compiler toolchain in $PATH when building
the mingw-w64 tools. (Logically, build-mingw-w64-tools belong
with build-llvm and install-wrappers; using the original system
compiler to build tools that are supposed to run on the current
machine, as opposed to the cross target, like when building the
runtimes.)
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.
Passing -lucrt* to the clang driver inhibits the implicit default
-lmsvcrt, so this ends up only using libucrtapp.a instead of libucrt.a.
This still requires that the default crt was ucrt, as the prebuilt
libc++.a needs to have been built for the right crt.
These aren't strictly necessary any longer, as the external libs
are used automatically if found (instead of erroring out if not
found, unless explicitly disabled as before).
Still keeping the explicit disables, to avoid potential issues if
e.g. the libs are found but exist in an incompatible version.
- Fixed the dinput/dinput8 libraries for armv7/aarch64
- Provide libcfgmgr32.a for aarch64
- Fix cases of duplicate definitions of snprintf/vsnprintf when using
msvcrt as crt, when building C++ code
- Fix cases where mftransform.h would undefine EXTERN_C, turning other
variables declared as EXTERN_C into actual definitions
Notable changes since the previously pinned (early December 2019)
version:
- Implicitly add the .exe suffix if not provided in the clang
-o argument, when running on windows (to match GCC's behaviour)
- Fixes for accesses to TLS variables in another object file
- Fixes for accessing weak functions that may be undefined, on ARM and AArch64
(x86 was fixed earlier)
- Fixed many instances of locale handling in libcxx
The GCC svn repo is no longer available, and fetching the whole GCC
git repo at around 1 GB is a bit wasteful, when we just need libssp
(which is less than 1 MB), but github provides svn access to git repos,
allowing us to fetch just this subdirectory.
Build one single test to verify that building generic code for mingw32uwp
works, but skip building all of the tests for this target.
Keep building the uwp-error test for all targets, to verify that it
builds successfully for mingw32 but fails for mingw32uwp.
This reduces the runtime for the tests by around a third.
These defines were renamed in lldb git master, soon after the current
pinned version.
This fixes building with a later version of llvm than the pinned one.
These days, we have a working strip tool, so we can do a slightly
more straightforward procedure here.
In build-make.sh we still build with -Wl,-s, as we call a less
obvious install target there, in order to only install mingw32-make.sh,
not some header files and documentation.
Since clang 9.0.0 (34ec6929a1fb33716d0035dc0f1f164d7568b4dc
in llvm-project), it's no longer necessary to set this to be able
to use __cxa_thread_atexit (for TLS destructors). This brings the
behaviour closer to GCC, and reduces the amount of non-default
options used.
Notable changes since the previous version are:
- Added a lld option for requesting delay loading libraries
- Allowing using custom .edata from input object files in lld (for Wine)
- Fixed llvm-dlltool with symbol renaming with stdcall decorations
- Supporting merging resources from more than one resource object file in lld
- Improved error messages for duplicate or undefined symbols in lld
(including demangling C++ symbols and printing source locations
where possible)
- Made lld look for for more library name patterns, matching GNU ld
- Brushed up support for using LLDB for, and building on, mingw
- Implemented initial support for armv7 and aarch64 windows in LLDB