Commit Graph
713 Commits
Author SHA1 Message Date
Martin Storsjö fe57d608de test: Add tests for conversion between 64 bit integers and long double 2021-10-14 12:34:00 +03:00
Martin Storsjö 13d48841a0 build-libcxx: Stop specifying a number of build settings that are set to their defaults 2021-10-14 12:33:22 +03:00
Martin Storsjö 378525eb9b build-mingw-w64: Update to the current version from October 1st 2021-10-01 22:27:39 +03:00
Martin Storsjö 214b775065 build-lldb-mi: Update to the latest upstream version
This fixes a bunch of build warnings in some setups.
2021-10-01 22:22:53 +03:00
Martin Storsjö 0adff0df7d build-libcxx: Stop manually specifying -lunwind
Specifying -lunwind isn't needed if building a version of libcxx
after 5f9be2c3e37c0428ba56876dd84af04b8d9d8915 (Feb 2021); then
libcxx is built with -nostdlib++ which keeps automatically linking
in -lunwind if -unwindlib=libunwind is used.
2021-10-01 12:32:47 +03:00
Martin Storsjö e35ef3b7d7 Use -unwindlib=libunwind instead of merging libunwind into libc++
This makes the build of libcxx a bit cleaner, and simplifies later
building and testing of libcxx.
2021-10-01 12:31:51 +03:00
Martin Storsjö e40ff6ab49 build-llvm: Bump to llvmorg-13.0.0
In addition to the changes in 13.0.0 RC1 (listed in
9188cce153), the following changes
relevant to llvm-mingw were made:

- Allow specifying language to llvm-rc with an 0x prefix
- Let the last specified option of -mconsole/-mwindows take effect
- Support both "--opt value" and "--opt=value" for more options in lld
- Add support for the --disable-dynamicbase option spelling in lld,
  in addition to the old existing --no-dynamicbase
- Fix linking with when enabling profiling
2021-10-01 12:25:25 +03:00
Martin Storsjö 42d2eb7346 wrappers: Remove the dlltool wrapper
Since LLVM 13, llvm-dlltool can imply the target architecture from
a triple prefix on the tool name, so there's no more need for a
wrapper.

The *-dlltool tools are now symlinks to the main llvm-dlltool
executable. In the Windows distribution, the *-dlltool.exe used to be
copies of dlltool-wrapper.exe (which is small; 15 KB). Now they
will instead be copies of llvm-dlltool.exe. Luckily, thanks to
building with -DLLVM_LINK_LLVM_DYLIB=ON by default, llvm-dlltool.exe
is only a mere 65 KB, while it used to be much larger, e.g. around
11 MB in older releases.
2021-09-17 11:09:35 +03:00
Martin Storsjö 671c408b9b readme: Mention that asan doesn't work properly with msvcrt
This was concluded in https://github.com/mstorsjo/llvm-mingw/issues/224.
2021-08-27 11:03:12 +03:00
Martin Storsjö 69d3d40f00 build-python: Fix rebuilding with an already checked out directory
After applying patches (with plain 'patch' instead of 'git am'), we
need to reset the tree to be able to check out the targeted version
again.
2021-08-17 11:13:45 +03:00
Martin Storsjö b0864ea9ae strip-llvm: Remove import libraries for liblldb/libLLVM/libclang-cpp
The import libraries for libLLVM/libclang-cpp are rather large
(21 and 15 MB each), while it hasn't been too much of an issue
with liblldb.dll.a (which was 600 KB).
2021-08-16 14:00:04 +03:00
Martin Storsjö d8ab02f1dd release: Include python in the cross built toolchains 2021-08-16 12:29:52 +03:00
Martin Storsjö 6769ecda7b Dockerfile.cross: Add an option for building python 2021-08-16 12:29:52 +03:00
Long Nguyen 52f07a108d README: Add autoconf and libtool as required MSYS2 packages 2021-08-16 11:26:37 +03:00
Long Nguyen 8da020bc38 build-cross-tools: Add --with-python flag 2021-08-16 11:26:37 +03:00
Long Nguyen 977a8b41db build-llvm: Add --with-python flag 2021-08-16 11:26:37 +03:00
Long Nguyen 8ff26ac253 Add a script for cross building python 2021-08-16 11:26:37 +03:00
Martin Storsjö 177cd0d33d Include the llvm-readelf tool 2021-08-16 11:26:37 +03:00
Martin Storsjö eaf5ac08e5 Build lldb-mi
Building this tool requires having a full LLVM build available;
either by installing without LLVM_INSTALL_TOOLCHAIN_ONLY (and not
stripping the llvm installation yet) or by pointing it at the
LLVM build directory instead. The latter works better for our
normal build flows.
2021-08-16 11:26:37 +03:00
Martin Storsjö 169455ed6b build-libcxx: Stop setting LIBCXXABI_TARGET_TRIPLE
It doesn't seem to be strictly necessary right now, in the current
configuration.
2021-08-11 11:19:17 +03:00
Martin Storsjö 8915db817c wrappers: Remove windres-wrapper; llvm-windres is available since LLVM 13.0.0 2021-08-09 12:08:16 +03:00
Martin Storsjö ea46c8d98f build-openmp.sh: Use llvm-ml instead of uasm 2021-08-09 12:08:16 +03:00
Martin Storsjö 63a5d3c09f build-llvm: Include the llvm-ml tool 2021-08-09 12:08:16 +03:00
Martin Storsjö b7c5fc5ef0 test: Add tests for _bittest* intrinsics 2021-08-09 12:08:16 +03:00
Martin Storsjö 5070c39532 test: Add testing of more float formatting cases, including %a 2021-08-09 12:08:16 +03:00
Martin Storsjö 50fb2ef45d test: Add tests for printf formatting of %+u (and %+<n>[doux]) 2021-08-09 12:08:16 +03:00
Martin Storsjö cf18e2de01 test: Add tests for strtod/strtof/strtold/wcstod/wcstof/wcstold 2021-08-09 12:08:16 +03:00
Martin Storsjö ea4f925038 test: Add a test for printf formatting of long doubles 2021-08-09 12:08:16 +03:00
Martin Storsjö 86630da230 build-compiler-rt: Stop creating an i386-w64-mingw32 sysroot symlink
This shouldn't be needed any longer since
8bd2722f65cfd7883ed9769f7bad3ff50e4c6905 in llvm-project (March 2021).
2021-08-09 12:08:16 +03:00
Martin Storsjö 13e065bf1a build-libcxx: Don't manually install libunwind.dll
libunwind installs the built DLL since
39ad160468e2b6acaa0b2b1ab353079eca4a3b03 (March 2021).
2021-08-09 12:08:16 +03:00
Martin Storsjö 056cb22fb5 build-compiler-rt: Stop setting CMAKE_*_COMPILER_WORKS
Since 8368e4d54c459fe173d76277f17c632478e91add in llvm-project (pushed
on March 11 2021), the lib/builtins CMakeLists.txt sets
CMAKE_TRY_COMPILE_TARGET_TYPE to STATIC_LIBRARY, which makes the
compiler tests pass before the toolchain is fully functional, by not
doing linking tests.
2021-08-09 12:08:16 +03:00
Martin Storsjö 98583d7bd9 build-compiler-rt: Do a plain "ninja install" instead of manually copying files
This still requires manually moving the dll files to the arch specific
runtime directory.

This requires building a version of llvm past
8e11bede3a6ac11ebcc05c82fac39899feaf9534 (March 18th 2021)
2021-08-09 12:08:16 +03:00
Martin Storsjö eda9036b6a build-mingw-w64.sh: Bump to the current version from August 8th 2021-08-09 12:08:16 +03:00
Martin Storsjö 9188cce153 build-llvm.sh: Bump to llvmorg-13.0.0-rc1
Notable changes since 12.0.0 for llvm-mingw are:

llvm:
- Produce proper cross-section relative relocations on ARM and AArch64
- Fixed the calling convention for AArch64 for variadic functions involving
  floats in the fixed arguments
- Added a windres compatible frontend in llvm-rc, avoiding the need for
  external wrappers
- Build LLVM with -ffunction-sections and --gc-sections, shrinking
  a full build of llvm-mingw without LLVM_BUILD_LLVM_DYLIB by 22%
  (but llvm-mingw uses LLVM_BUILD_LLVM_DYLIB these days, which shrinks
  the build even more)
- Avoid optimizing/changing function calls into stpcpy due to optimizations
- llvm-ml has improved to the point where it can build the OpenMP assembly
  file without needing to use another assembler tool

lld:
- Support linking directly against DLLs without using import libraries
- Improved reliability when running on Windows, avoiding some hangs
  when terminating
- Fixed linking with --export-all-symbols in combination with
  -ffunction-sections
- Fixed --export-all-symbols when linking EXEs
- Fixed autoexport from LTO objects with comdat symbols
- Print warnings with a "ld.lld" prefix instead of "lld-link"
- Avoid thread exhaustion on 32 bit Windows
- Accepting more forms of options, like -static and --stack=

clang:
- Fixed reading long doubles with va_arg on x86_64
- Fixed calling std::once in a dynamically linked libstdc++

runtimes:
- Complete support for std::filesystem in libc++ (which was previously
  backported to 12.0.0 in llvm-mingw too, but the previous release had
  a bug in using e.g. the u8path() method when linking against the DLL
  version of libc++)
- Implemented semaphores in libc++
- Provide the __gcc_personality_seh0 symbol, fixing building C code with
  -fexceptions and __attribute__((cleanup))
- Simplified building/installing compiler-rt and libunwind
- Silenced lots of build warnings in OpenMP
2021-08-09 12:08:13 +03:00
Martin Storsjö 1f5a7e0577 test: Remove a workaround for older wine versions
I've updated my continuous test setup to a newer version of wine now,
not needing this workaround.
2021-08-03 11:36:12 +03:00
Martin Storsjö 277b8c4c27 Dockerfile: Upgrade the version of git bundled in the docker image
This fixes the root cause for PR #210, differently.
2021-07-05 23:46:29 +03:00
Martin Storsjö c9fec3ee8f Dockerfile: Add a comment about the manually installed CMake 2021-07-05 23:46:23 +03:00
Adrian Antkowiak 9b6966484f Use git depth=1 when cloning llvm 2021-07-05 23:32:07 +03:00
Martin Storsjö 46efff459a build-llvm: Build with a shared libLLVM and libclang-cpp
This reduces the size of e.g. the zipped toolchain for Windows
from 183 MB to 85 MB.
2021-07-01 23:33:28 +03:00
Martin Storsjö e2ad2d4b64 run-tests: Don't assume running on x86
Also use $COPY_X86 for consistency.
2021-07-01 22:36:54 +03:00
Martin Storsjö 1629861108 run-tests: Move a comment closer to the line it refers to 2021-07-01 22:36:54 +03:00
Martin Storsjö bd9c8df3b8 build-libcxx: Don't manually install libc++.dll
libcxx installs the built DLL since
97d6fcce4ec6765c0e77db29c87e8083137c443d in llvm-project (July 2019)
when doing "ninja install".
2021-06-16 14:29:27 +03:00
Martin Storsjö 4951f6f682 build-libcxx: Stop setting -Wno-dll-attribute-no-redeclaration when building libunwind
This is set by libunwind itself since
df6d2e8ab1a4212284e4763724a2211df2c7394a in llvm-project.
2021-06-16 14:15:37 +03:00
Martin Storsjö 14098d92bc build-libcxx: Remove some unused cmake defines
These don't seem to be necessary in practice at the moment.

If building on top of a stripped llvm install, while there's an
older version of llvm (providing llvm-config) installed system
wide, we currently still manage to build things correctly.

(If llvm-config from LLVM 6.0 is available, build-compiler-rt.sh
fails though, but that's unaffected by this change. In current
git versions of compiler-rt, it first and foremost looks inside
the monorepo checkout instead of looking for a potentially
unrelated llvm-config binary.)
2021-06-16 14:04:45 +03:00
Martin Storsjö 59121bc4a0 build-libcxx: Don't manually undefine _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS
Instead set the cmake defines that indicate that libcxx is going
to be linked dynamically and going to link in libcxxabi statically,
so that libcxxabi is built statically but with dllexport attributes.
2021-06-16 12:08:54 +03:00
Martin Storsjö 1843f12515 build-libcxx: Stop setting one unnecessary visibility define
Since libcxx includes libcxxabi with
_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS defined, the libcxxabi
declarations contain neither dllimport nor dllexport.

Earlier, we didn't use to include the libcxxabi headers with
_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS defined, but defining
_LIBCXXABI_BUILDING_LIBRARY instead. This caused libcxxabi
declarations to be marked dllexport. If any such functions would
end up emitted as part of the libcxx object files, this would
have been necessary to get them properly exported.

In practice libcxxabi functions aren't generated while included
in libcxx (they aren't templates and/or header inline functions),
_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS gets defined by the cmake
files, so we don't need to set this at all any longer.
2021-06-16 12:05:58 +03:00
Martin Storsjö b37483cec5 build-libcxx: Stop manually defining _LIBCPP_BUILDING_LIBRARY
Since before the LLVM 12.x branch, these aren't necessary any
longer.

(9c30bafd59bf1078bbe1c235c7c25bf7e278e2e9 and
8a73aa8c4c3ee82e7d650c6a957937713a4a9ab4 in llvm-project)

Since 9c30bafd59bf1078bbe1c235c7c25bf7e278e2e9 in llvm-project,
libcxxabi unconditionally defines _LIBCPP_BUILDING_LIBRARY while
building.

Since 8a73aa8c4c3ee82e7d650c6a957937713a4a9ab4 in llvm-project,
libcxx defines _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS if
LIBCXX_ENABLE_STATIC_ABI_LIBRARY is set.
2021-06-16 11:59:02 +03:00
Martin Storsjö 459e37f03f wrappers: Convert dlltool-wrapper to a native executable
This allows running it on windows from processes other than msys
based ones.
2021-06-14 11:44:06 +03:00
Martin Storsjö 657d12c8a5 Backport another libc++ patch for std::filesystem (and locale) usage
This fixes linking against a DLL of libc++ while using the common headers
(generated from the static version of the library, but which work for
both shared and static versions) when calling e.g. std::filesystem::u8path.
2021-05-25 23:55:32 +03:00
Martin Storsjö 168cc5f53d build-mingw-w64-tools: Build and install gendef too 2021-05-04 12:12:16 +03:00