From a015c21f163da6db9bfcb83ef1f503788041d9d5 Mon Sep 17 00:00:00 2001 From: DevJPM Date: Sun, 15 Nov 2020 12:06:12 +0100 Subject: [PATCH 1/2] Applied LLVM 9 fixes to LLVM 9 PR CI Dockerfile Now with LLVM 9 being the minimum supported version, we can finally remove the hacks in the dockerfile. This wasn't in the main PR bumping the version as I didn't quite understand what's going on and needed here. --- .../host-x86_64/x86_64-gnu-llvm-9/Dockerfile | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-9/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-9/Dockerfile index 0ab1f727a29a0..2893a2fb4f197 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-9/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-9/Dockerfile @@ -39,22 +39,13 @@ ENV SCRIPT python2.7 ../x.py --stage 2 test --exclude src/tools/tidy && \ # the PR is approved and tested for merging. # It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`, # despite having different output on 32-bit vs 64-bit targets. - # - # HACK(eddyb) `armv5te` is used (not `i686`) to support older LLVM than LLVM 9: - # https://github.com/rust-lang/compiler-builtins/pull/311#issuecomment-612270089. - # This also requires `--pass=build` because we can't execute the tests - # on the `x86_64` host when they're built as `armv5te` binaries. - # (we're only interested in the MIR output, so this doesn't matter) - python2.7 ../x.py --stage 2 test src/test/mir-opt --pass=build \ - --host='' --target=armv5te-unknown-linux-gnueabi && \ + python2.7 ../x.py --stage 2 test src/test/mir-opt \ + --host='' --target=i686-unknown-linux-gnu && \ # Run the UI test suite again, but in `--pass=check` mode # # This is intended to make sure that both `--pass=check` continues to # work. # - # FIXME: We ideally want to test this in 32-bit mode, but currently - # (due to the LLVM problems mentioned above) that isn't readily - # possible. - python2.7 ../x.py --stage 2 test src/test/ui --pass=check && \ + python2.7 ../x.py --stage 2 test src/test/ui --pass=check --target=i686-unknown-linux-gnu && \ # Run tidy at the very end, after all the other tests. python2.7 ../x.py --stage 2 test src/tools/tidy From b8f682b5e24625eedaa3874061c77bae131a27ae Mon Sep 17 00:00:00 2001 From: DevJPM Date: Sun, 15 Nov 2020 14:56:18 +0100 Subject: [PATCH 2/2] Fixed missing / bad header when cross-compiling to i686 It seems that by default the 32-bit headers are not actually installed when installing development tooling. As we're using gcc headers, we need to install them as an extra package. See for reference: - https://stackoverflow.com/a/54082790 - https://askubuntu.com/a/106092 Also removed the now unused arm tooling --- src/ci/docker/host-x86_64/x86_64-gnu-llvm-9/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-9/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-9/Dockerfile index 2893a2fb4f197..38eac6588b02c 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-9/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-9/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:18.04 RUN apt-get update && apt-get install -y --no-install-recommends \ g++ \ - g++-arm-linux-gnueabi \ + gcc-multilib \ make \ ninja-build \ file \