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
This contains new declarations that the latest version of llvm
requires, when building llvm for windows on aarch64.
Notable changes are:
- Fixed compatibility fallbacks for running libc++ on Windows 7
- Improved handling of multibyte functions with UCRT
- Fixed installing mingw-w64-crt and widl in paths that contain spaces
- Fixed sscanf with double output on arm/aarch64
- Improved math functions, in particular for arm/aarch64
This makes it easier to change the default win32 target when using
build-all.sh, and also makes it possible to change the version of
mingw-w64 that is used, which wasn't possible at all before.
On windows, we rename clang.exe to clang-$MAJOR.exe, and later
install clang.exe as a wrapper for the default architecture. But
if only building certain architectures, and the host architecture
isn't one of them, we shouldn't install any unprefixed clang.exe at
all.
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).
On some distributions, e.g. openSUSE, the libraries for 64 bit
architectures end up stored in <target>/<triplet>/lib64 instead of
plain "lib".
(This is caused by their use of a site script for configure, which
overrides libdir when the host triplet matches 64 bit architecture
names - even if it's a triple for cross compilation for a totally
different OS. This only affects the libraries and not mingw-w64-crt,
as the crt's makefiles manually set the output directory name.)
This fixes https://github.com/mstorsjo/llvm-mingw/issues/51.
This version contains fixes for wchar printf functions in how they
handle %s/%S formats.
This isn't the absolute latest version, as there's other commits further
ahead adding support for _FORTIFY_SOURCE (which has little to no effect
with Clang as it doesn't evaluate __builtin_object_size in inlined
contexts), and the commits for _FORTIFY_SOURCE caused a few regressions,
and things might still be a bit in flux (even though the current master
seems to work fine).
This makes cmake use relative paths to all source files, allowing ccache
to reuse compilation results from different source trees in different
directories.
Keep using LLVM_ENABLE_PROJECTS on msys, where symlinks aren't supported.
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.