From 4f194d0db78f612233234a7db659384cd62709fb Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 15 Jun 2021 15:07:03 -0400 Subject: [PATCH] [libc++] Promote GCC 11 to mandatory CI Also, fix the last issue that prevented GCC 11 from passing the test suite. Thanks to everyone else who fixed issues. Differential Revision: https://reviews.llvm.org/D104315 --- .../atomic_is_lock_free.pass.cpp | 23 +++++++++------------- libcxx/utils/ci/Dockerfile | 4 +--- libcxx/utils/ci/buildkite-pipeline.yml | 18 ++++++++--------- libcxx/utils/ci/run-buildbot | 10 +++++----- .../test/catch_member_function_pointer_02.pass.cpp | 2 +- 5 files changed, 24 insertions(+), 33 deletions(-) diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp index 1ad33e3..12d0354 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp @@ -12,12 +12,10 @@ // // template -// bool -// atomic_is_lock_free(const volatile atomic* obj); +// bool atomic_is_lock_free(const volatile atomic* obj); // // template -// bool -// atomic_is_lock_free(const atomic* obj); +// bool atomic_is_lock_free(const atomic* obj); #include #include @@ -29,23 +27,20 @@ template struct TestFn { void operator()() const { typedef std::atomic A; - A t; + A t = T(); bool b1 = std::atomic_is_lock_free(static_cast(&t)); - volatile A vt; + volatile A vt = T(); bool b2 = std::atomic_is_lock_free(static_cast(&vt)); assert(b1 == b2); } }; -struct A -{ - char _[4]; +struct A { + char x[4]; }; -int main(int, char**) -{ - TestFn()(); - TestEachAtomicType()(); - +int main(int, char**) { + TestFn()(); + TestEachAtomicType()(); return 0; } diff --git a/libcxx/utils/ci/Dockerfile b/libcxx/utils/ci/Dockerfile index 2c90680..1c8eb11 100644 --- a/libcxx/utils/ci/Dockerfile +++ b/libcxx/utils/ci/Dockerfile @@ -58,11 +58,9 @@ RUN . /tmp/env.sh && apt-get install -y clang-format-$LLVM_VERSION RUN ln -s $(find /usr/bin -regex '^.+/clang-format-[0-9.]+$') /usr/bin/clang-format && [ -e $(readlink /usr/bin/clang-format) ] RUN ln -s $(find /usr/bin -regex '^.+/git-clang-format-[0-9.]+$') /usr/bin/git-clang-format && [ -e $(readlink /usr/bin/git-clang-format) ] -# Install a recent GCC +# Install the most recent GCC version and the previous one (which are the two we support) RUN add-apt-repository ppa:ubuntu-toolchain-r/test RUN apt-get update && apt install -y gcc-10 g++-10 gcc-11 g++-11 -RUN ln -f -s /usr/bin/g++-10 /usr/bin/g++ && [ -e $(readlink /usr/bin/g++) ] -RUN ln -f -s /usr/bin/gcc-10 /usr/bin/gcc && [ -e $(readlink /usr/bin/gcc) ] # Install a recent CMake RUN wget https://github.com/Kitware/CMake/releases/download/v3.18.2/cmake-3.18.2-Linux-x86_64.sh -O /tmp/install-cmake.sh diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml index 7daaab1..6b9e540 100644 --- a/libcxx/utils/ci/buildkite-pipeline.yml +++ b/libcxx/utils/ci/buildkite-pipeline.yml @@ -124,7 +124,7 @@ steps: - exit_status: -1 # Agent was lost limit: 2 - - label: "GCC/C++20" + - label: "GCC Current/C++20" command: "libcxx/utils/ci/run-buildbot generic-gcc" artifact_paths: - "**/test-results.xml" @@ -135,8 +135,13 @@ steps: - exit_status: -1 # Agent was lost limit: 2 - - label: "GCC-next/C++20" - command: "libcxx/utils/ci/run-buildbot generic-gcc-next" + # + # All other supported configurations of libc++. + # + - wait + + - label: "GCC Previous/C++20" + command: "libcxx/utils/ci/run-buildbot generic-gcc-prev" artifact_paths: - "**/test-results.xml" agents: @@ -145,13 +150,6 @@ steps: automatic: - exit_status: -1 # Agent was lost limit: 2 - soft_fail: - - exit_status: 1 - - # - # All other supported configurations of libc++. - # - - wait - label: "-fno-exceptions" command: "libcxx/utils/ci/run-buildbot generic-noexceptions" diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot index 605e5a7..d076f5f 100755 --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils/ci/run-buildbot @@ -279,15 +279,15 @@ generic-32bit) check-cxx-cxxabi ;; generic-gcc) - export CC=gcc - export CXX=g++ + export CC=gcc-11 + export CXX=g++-11 clean generate-cmake check-cxx-cxxabi ;; -generic-gcc-next) - export CC=gcc-11 - export CXX=g++-11 +generic-gcc-prev) + export CC=gcc-10 + export CXX=g++-10 clean generate-cmake check-cxx-cxxabi diff --git a/libcxxabi/test/catch_member_function_pointer_02.pass.cpp b/libcxxabi/test/catch_member_function_pointer_02.pass.cpp index d203fe3..f92035b 100644 --- a/libcxxabi/test/catch_member_function_pointer_02.pass.cpp +++ b/libcxxabi/test/catch_member_function_pointer_02.pass.cpp @@ -12,7 +12,7 @@ // GCC 7 and 8 support noexcept function types but this test still fails. // This is likely a bug in their implementation. Investigation needed. -// XFAIL: gcc-7, gcc-8, gcc-9, gcc-10 +// XFAIL: gcc-7, gcc-8, gcc-9, gcc-10, gcc-11 #include -- 2.7.4