Commit Graph
54 Commits
Author SHA1 Message Date
Martin Storsjö ea46c8d98f build-openmp.sh: Use llvm-ml instead of uasm 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ö 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
Martin Storsjö 2094638569 patches: Patch the llvm 12.x release to include support for std::filesystem in libcxx 2021-04-23 10:58:42 +03:00
Martin Storsjö e1f30312e9 Dockerfile: Update the installed version of CMake, install an arch specific version
This fixes building the dockerfiles on aarch64.
2021-04-23 10:54:07 +03:00
Martin Storsjö 0200472671 test: Add a testcase for cleanup of C++ destructors while doing longjmp
For x86_64 and aarch64, this requires https://reviews.llvm.org/D89231.

The C++ destructors aren't executed while doing the longjmp (contrary
to how it works MSVC's C++ exceptions), but it no longer crashes.
2021-04-15 11:36:20 +03:00
Martin Storsjö 547927e1d3 dockerfile: Install the zip tool in the base image
This is needed when packaging the cross built toolchains anyway.
2021-04-14 09:37:18 +03:00
Martin Storsjö 9494c9c2a9 dockerfile: Switch vim to vim-tiny in the docker images 2021-04-14 09:37:18 +03:00
Martin Storsjö be89715b8b dockerfile: Install python3
This is required by LLVM 12.
2021-04-14 09:37:18 +03:00
Martin Storsjö 82a540877d dockerfile: Install a newer version of CMake
This is required if building the master version of LLVM, past the
11 release branch.
2021-04-14 09:37:18 +03:00
Martin Storsjö 790bc40855 test: Add a testcase for throwing/catching C++ exceptions across DLLs 2021-02-19 16:19:47 +02:00
Orgad Shaneh 959f14a1c1 libssp: Download directory from gitlab instead of svn
svn is typically blocked on corporate firewalls.
2020-11-11 12:48:15 +02:00
Martin Storsjö d334f83671 docker: Install curl and less in the base test images
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.
2020-11-03 14:04:21 +02:00
Martin Storsjö 2377f1a839 test: Explicitly test linking the C++ runtime statically 2020-10-23 12:17:35 +03:00
Martin Storsjö 9031eb6791 Build the OpenMP runtime in docker based builds
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.
2020-10-15 23:23:05 +03:00
Martin Storsjö c82a6f2340 test: Add a testcase for the global termminate handler 2020-09-16 00:07:46 +03:00
Martin Storsjö 3fd3e58979 build-mingw-w64: Split out building tools to a separate script
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.)
2020-09-16 00:03:57 +03:00
Martin Storsjö 308f7227c5 test: Add an idl testcase 2020-09-16 00:03:57 +03:00
Martin Storsjö 2c1a4645d9 Update the base distro used for dockerfiles and linux releases to Ubuntu 18.04
There's probably not much need for binaries based on 16.04 any longer.
2020-03-25 00:24:26 +02:00
Martin Storsjö b5ae2b5cc7 Allow overriding the default crt in dockerfiles with --build-arg DEFAULT_CRT=msvcrt 2019-11-13 12:39:30 +02:00
Martin Storsjö 0f9d9f1986 Check out llvm sources using the new llvm git monorepo
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.
2019-09-12 13:14:19 +03:00
Martin Storsjö 315e1ab683 Install the needed packages in docker images with --no-install-recommends
This avoids installing a few unneeded ones, but requires manually
picking ca-certificates instead.
2019-08-01 22:30:32 +03:00
Martin Storsjö 97ca0681bc wrappers: Split out shared helpers for native wrapper executables to a header 2019-05-06 11:04:53 +03:00
Martin Storsjö 8cf83f259e Add the testcase from llvm PR40322 2019-04-30 00:03:19 +03:00
Martin Storsjö 005b8efd91 Allow building a full llvm install 2019-03-15 23:56:18 +02:00
Martin Storsjö 62b208aee2 Use llvm-objcopy/llvm-strip instead of a shell script wrapper and binutils 2019-01-24 10:58:20 +02:00
Martin Storsjö 585c767ee4 Use llvm-ar with the flag 'L' instead of a helper MRI script for merging archives 2018-12-20 12:11:10 +02:00
Martin Storsjö 99e2fefc9d Use nproc and sysctl -n hw.cpu for default initializing CORES
This avoids having to pass --build-arg CORES=n when building the
docker images.
2018-11-09 22:20:34 +02:00
Martin Storsjö c9817eca35 Add a testcase for ubsan 2018-10-17 22:45:54 +03:00
Martin Storsjö f5008d5380 Merge build-mingw-w64-widl.sh back into build-mingw-w64.sh
This allows checking out the mingw-w64 repo if it is missing, when
building widl.
2018-10-17 22:45:54 +03:00
Martin Storsjö 5390b58835 Consistently use "COPY .. ./" in Dockerfiles
This avoids potential issues and confusion with cases where a plain "." as
target doesn't work.
2018-10-16 20:25:39 +03:00
Martin Storsjö fb4862b0d6 Split out building widl to a separate shell script
When cross compiling a llvm-mingw toolchain, we need to build widl
for the intended host environment as well.
2018-10-02 21:34:54 +03:00
Martin Storsjö 6bb0cfca58 Convert TOOLCHAIN_ARCHS from ENV to ARG
This allows overriding it with --build-arg.
2018-10-02 21:34:54 +03:00
Martin Storsjö a38e52fff5 Build address sanitizer 2018-10-02 14:53:53 +03:00
Martin Storsjö 6d7cef9e9e test: Rename ssp.c to stacksmash.c 2018-10-02 14:53:53 +03:00
Martin Storsjö f0aa7c4c10 Revert "Use dwarf exceptions on i686 as well"
This reverts commit ca43ab5ccd.

It was reported in https://github.com/mstorsjo/llvm-mingw/issues/8 that
the dwarf unwinding on i686 doesn't always work.

This commit adds a testcase for the case that didn't work previously.
2018-10-01 14:28:30 +03:00
Martin Storsjö ab1da59a48 Use a single COPY command in dockerfiles for both *.sh and *.c for wrappers 2018-09-14 09:38:44 +02:00
Martin Storsjö aa80a9ecbc Copy the built DLLs into the test output directories 2018-09-05 12:28:33 +03:00
Martin Storsjö 37f8ba8516 Add tests for the autoimport feature 2018-09-05 12:21:46 +03:00
Martin Storsjö 470008f09c Factorize the building of test DLLs in the dockerfile 2018-09-05 11:53:46 +03:00
Martin Storsjö 09567cdc96 Build tlstest-lib.dll in the arch specific output subdirectory as well
This was missed in 0448bd61.
2018-09-05 11:52:57 +03:00
Martin Storsjö 4a1c91c208 Add a testcase for libssp 2018-08-13 23:50:01 +03:00
Martin Storsjö 0448bd616a Build tests in a separate subdirectory for each arch
This eases cases when testcases contain DLLs, whose names won't
contain the arch name.
2018-08-13 23:49:08 +03:00
Martin Storsjö 917860d0ef Amend the comment about the size of the docker image 2018-08-03 11:58:59 +03:00
Martin Storsjö ca8ce421cd Strip the llvm installation after building
This still inflates the docker image chain since it's done in
a separate RUN command though.

This tests that one still can (re)build
compiler-rt/libunwind/libcxxabi/libcxx after stripping down the llvm
installation.
2018-08-03 10:56:49 +03:00
Martin Storsjö 26ab7a4424 Add a test app for thread local variables with destructors 2018-08-03 10:19:50 +03:00
Martin Storsjö 609fe4b81d Use binutils objcopy and strip if available
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.
2018-07-25 00:56:58 +03:00
Martin Storsjö 3c1c81f321 Build the winstorecompat library from mingw-w64-libraries 2018-07-16 23:30:54 +03:00
Martin Storsjö 3b3924e4b1 test: Add a testcase for setjmp 2018-06-05 23:40:25 +03:00