[libcxx-commits] [libcxx] [llvm] [libc++][WIP] Move to Github hosted builders (PR #109720)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 24 06:25:34 PDT 2024
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/109720
>From 22b80131356cfc4252f9dc8bb4eeb15e85af921a Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 23 Sep 2024 17:23:35 -0400
Subject: [PATCH 01/10] [libc++][WIP] Move to Github hosted builders
Libc++ experiences periodic outages of our Github actions builders,
which are quite disruptive. Unfortunately, the Github self-hosted
runner setup is very opaque. It works extremely well when it works,
but most contributors are unable to troubleshoot issues related to
the setup when they happen.
This patch attempts to move the libc++ builders to normal Github
hosted runners. This is primarily to evaluate the feasibility of
such a change, which would simplify our CI setup but may not scale
sufficiently for our needs.
---
.github/workflows/libcxx-build-and-test.yaml | 32 ++++++++++----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index b5e60781e00064..bdf4c1b74fdbaa 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -49,7 +49,13 @@ env:
jobs:
stage1:
if: github.repository_owner == 'llvm'
- runs-on: libcxx-runners-8-set
+ runs: &docker-image
+ using: 'docker'
+ image: 'libcxx/utils/ci/Dockerfile'
+ args:
+ - BASE_IMAGE: ghcr.io/actions/actions-runner:2.317.0
+ - GCC_LATEST_VERSION: 14
+ - LLVM_HEAD_VERSION: 20
continue-on-error: false
strategy:
fail-fast: false
@@ -84,7 +90,8 @@ jobs:
**/crash_diagnostics/*
stage2:
if: github.repository_owner == 'llvm'
- runs-on: libcxx-runners-8-set
+ runs:
+ <<: *docker-image
needs: [ stage1 ]
continue-on-error: false
strategy:
@@ -136,12 +143,15 @@ jobs:
matrix:
config: [
'generic-abi-unstable',
+ 'generic-asan',
+ 'generic-cxx26',
'generic-hardening-mode-debug',
'generic-hardening-mode-extensive',
'generic-hardening-mode-fast',
'generic-hardening-mode-fast-with-abi-breaks',
'generic-merged',
'generic-modules-lsv',
+ 'generic-msan',
'generic-no-exceptions',
'generic-no-experimental',
'generic-no-filesystem',
@@ -155,25 +165,15 @@ jobs:
'generic-no-rtti',
'generic-optimized-speed',
'generic-static',
+ 'generic-tsan',
+ 'generic-ubsan',
# TODO Find a better place for the benchmark and bootstrapping builds to live. They're either very expensive
# or don't provide much value since the benchmark run results are too noise on the bots.
'benchmarks',
'bootstrapping-build'
]
- machine: [ 'libcxx-runners-8-set' ]
- include:
- - config: 'generic-cxx26'
- machine: libcxx-runners-8-set
- - config: 'generic-asan'
- machine: libcxx-runners-8-set
- - config: 'generic-tsan'
- machine: libcxx-runners-8-set
- - config: 'generic-ubsan'
- machine: libcxx-runners-8-set
- # Use a larger machine for MSAN to avoid timeout and memory allocation issues.
- - config: 'generic-msan'
- machine: libcxx-runners-8-set
- runs-on: ${{ matrix.machine }}
+ runs:
+ <<: *docker-image
steps:
- uses: actions/checkout at v4
- name: ${{ matrix.config }}
>From 2fdbb387fd0109cd3d9b223c1e5b88b3f3b75e9b Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 23 Sep 2024 17:36:33 -0400
Subject: [PATCH 02/10] Touch libc++ file to trigger CI
---
libcxx/foo | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 libcxx/foo
diff --git a/libcxx/foo b/libcxx/foo
new file mode 100644
index 00000000000000..e69de29bb2d1d6
>From a494ba9c3ea9d5e20154c978f5d917e1b6877da2 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 23 Sep 2024 17:39:05 -0400
Subject: [PATCH 03/10] WIP: Try on ubuntu-latest
---
.github/workflows/libcxx-build-and-test.yaml | 21 ++++++++++----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index bdf4c1b74fdbaa..55e8f7ba16ff56 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -49,13 +49,14 @@ env:
jobs:
stage1:
if: github.repository_owner == 'llvm'
- runs: &docker-image
- using: 'docker'
- image: 'libcxx/utils/ci/Dockerfile'
- args:
- - BASE_IMAGE: ghcr.io/actions/actions-runner:2.317.0
- - GCC_LATEST_VERSION: 14
- - LLVM_HEAD_VERSION: 20
+ runs-on: ubuntu-latest
+ # runs: &docker-image
+ # using: 'docker'
+ # image: 'libcxx/utils/ci/Dockerfile'
+ # args:
+ # - BASE_IMAGE: ghcr.io/actions/actions-runner:2.317.0
+ # - GCC_LATEST_VERSION: 14
+ # - LLVM_HEAD_VERSION: 20
continue-on-error: false
strategy:
fail-fast: false
@@ -90,8 +91,7 @@ jobs:
**/crash_diagnostics/*
stage2:
if: github.repository_owner == 'llvm'
- runs:
- <<: *docker-image
+ runs-on: ubuntu-latest
needs: [ stage1 ]
continue-on-error: false
strategy:
@@ -172,8 +172,7 @@ jobs:
'benchmarks',
'bootstrapping-build'
]
- runs:
- <<: *docker-image
+ runs-on: ubuntu-latest
steps:
- uses: actions/checkout at v4
- name: ${{ matrix.config }}
>From 24e87959c4e573ef1c1147ea26652ced64f83bcd Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 23 Sep 2024 17:56:36 -0400
Subject: [PATCH 04/10] Try with fozzie-live Docker image
---
.github/workflows/libcxx-build-and-test.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index 55e8f7ba16ff56..226ac92939696e 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -50,6 +50,8 @@ jobs:
stage1:
if: github.repository_owner == 'llvm'
runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/libcxx/actions-builder:fozzie-live
# runs: &docker-image
# using: 'docker'
# image: 'libcxx/utils/ci/Dockerfile'
>From 0456f4c77eb6001e6035d9d6a63d888ed1bfb502 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 23 Sep 2024 18:03:28 -0400
Subject: [PATCH 05/10] Run more verbose
---
libcxx/utils/ci/run-buildbot | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index b0533cb9a49c93..18229333a34a7f 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -119,7 +119,7 @@ function generate-cmake-base() {
-DLIBCXX_ENABLE_WERROR=YES \
-DLIBCXXABI_ENABLE_WERROR=YES \
-DLIBUNWIND_ENABLE_WERROR=YES \
- -DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
+ -DLLVM_LIT_ARGS="--xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
"${@}"
}
>From cc626cf49f4fe01a78f0310a03cf154b70edadbe Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 23 Sep 2024 18:19:00 -0400
Subject: [PATCH 06/10] Use fozzie-live image everywhere
---
.github/workflows/libcxx-build-and-test.yaml | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index 226ac92939696e..2e8cdbda304a4e 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -52,13 +52,6 @@ jobs:
runs-on: ubuntu-latest
container:
image: ghcr.io/libcxx/actions-builder:fozzie-live
- # runs: &docker-image
- # using: 'docker'
- # image: 'libcxx/utils/ci/Dockerfile'
- # args:
- # - BASE_IMAGE: ghcr.io/actions/actions-runner:2.317.0
- # - GCC_LATEST_VERSION: 14
- # - LLVM_HEAD_VERSION: 20
continue-on-error: false
strategy:
fail-fast: false
@@ -94,6 +87,8 @@ jobs:
stage2:
if: github.repository_owner == 'llvm'
runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/libcxx/actions-builder:fozzie-live
needs: [ stage1 ]
continue-on-error: false
strategy:
@@ -175,6 +170,8 @@ jobs:
'bootstrapping-build'
]
runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/libcxx/actions-builder:fozzie-live
steps:
- uses: actions/checkout at v4
- name: ${{ matrix.config }}
>From 88177cb7f200f34cdfbbd0c4e683bc85c3576182 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 23 Sep 2024 19:14:23 -0400
Subject: [PATCH 07/10] Run lit verbose
---
libcxx/utils/ci/run-buildbot | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 18229333a34a7f..315242781c4bf9 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -119,7 +119,7 @@ function generate-cmake-base() {
-DLIBCXX_ENABLE_WERROR=YES \
-DLIBCXXABI_ENABLE_WERROR=YES \
-DLIBUNWIND_ENABLE_WERROR=YES \
- -DLLVM_LIT_ARGS="--xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
+ -DLLVM_LIT_ARGS="-v --xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
"${@}"
}
>From 4fa1a176a09e30185d258a430e3bf3dd69f7cc29 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Tue, 24 Sep 2024 09:08:06 -0400
Subject: [PATCH 08/10] Try tweaking awk command
---
libcxx/test/libcxx/transitive_includes.gen.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/test/libcxx/transitive_includes.gen.py b/libcxx/test/libcxx/transitive_includes.gen.py
index 22075364bf1b79..97d36c2b2a5f77 100644
--- a/libcxx/test/libcxx/transitive_includes.gen.py
+++ b/libcxx/test/libcxx/transitive_includes.gen.py
@@ -93,7 +93,7 @@
// RUN: mkdir %t
// RUN: %{{cxx}} %s %{{flags}} %{{compile_flags}} --trace-includes -fshow-skipped-includes --preprocess > /dev/null 2> %t/trace-includes.txt
// RUN: %{{python}} %{{libcxx-dir}}/test/libcxx/transitive_includes_to_csv.py %t/trace-includes.txt > %t/actual_transitive_includes.csv
-// RUN: cat %{{libcxx-dir}}/test/libcxx/transitive_includes/%{{cxx_std}}.csv | awk '/^{escaped_header} / {{ print }}' > %t/expected_transitive_includes.csv
+// RUN: cat %{{libcxx-dir}}/test/libcxx/transitive_includes/%{{cxx_std}}.csv | awk '/^{escaped_header}[[:space:]]/ {{ print }}' > %t/expected_transitive_includes.csv
// RUN: diff -w %t/expected_transitive_includes.csv %t/actual_transitive_includes.csv
#include <{header}>
"""
>From 9a4ff86f36ea4a77536f25da0d0dbfbf39c0dbe6 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Tue, 24 Sep 2024 09:23:58 -0400
Subject: [PATCH 09/10] Avoid cat
---
libcxx/test/libcxx/transitive_includes.gen.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/test/libcxx/transitive_includes.gen.py b/libcxx/test/libcxx/transitive_includes.gen.py
index 97d36c2b2a5f77..73ea3fa6c4b42e 100644
--- a/libcxx/test/libcxx/transitive_includes.gen.py
+++ b/libcxx/test/libcxx/transitive_includes.gen.py
@@ -93,7 +93,7 @@
// RUN: mkdir %t
// RUN: %{{cxx}} %s %{{flags}} %{{compile_flags}} --trace-includes -fshow-skipped-includes --preprocess > /dev/null 2> %t/trace-includes.txt
// RUN: %{{python}} %{{libcxx-dir}}/test/libcxx/transitive_includes_to_csv.py %t/trace-includes.txt > %t/actual_transitive_includes.csv
-// RUN: cat %{{libcxx-dir}}/test/libcxx/transitive_includes/%{{cxx_std}}.csv | awk '/^{escaped_header}[[:space:]]/ {{ print }}' > %t/expected_transitive_includes.csv
+// RUN: awk '/^{escaped_header}[[:space:]]/ {{ print }}' %{{libcxx-dir}}/test/libcxx/transitive_includes/%{{cxx_std}}.csv > %t/expected_transitive_includes.csv
// RUN: diff -w %t/expected_transitive_includes.csv %t/actual_transitive_includes.csv
#include <{header}>
"""
>From ac88cf433f1219a3de3011d4e6dd17bab9e02eb3 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Tue, 24 Sep 2024 09:25:19 -0400
Subject: [PATCH 10/10] TEMP: Remove some tests to speedup feedback'
---
.../test/libcxx/clang_modules_include.gen.py | 66 -------------------
libcxx/test/libcxx/clang_tidy.gen.py | 39 -----------
libcxx/test/libcxx/double_include.gen.py | 35 ----------
libcxx/test/libcxx/header_inclusions.gen.py | 43 ------------
libcxx/test/libcxx/headers_in_modulemap.sh.py | 30 ---------
libcxx/test/libcxx/include_as_c.sh.cpp | 58 ----------------
libcxx/test/libcxx/no_assert_include.gen.py | 31 ---------
7 files changed, 302 deletions(-)
delete mode 100644 libcxx/test/libcxx/clang_modules_include.gen.py
delete mode 100644 libcxx/test/libcxx/clang_tidy.gen.py
delete mode 100644 libcxx/test/libcxx/double_include.gen.py
delete mode 100644 libcxx/test/libcxx/header_inclusions.gen.py
delete mode 100644 libcxx/test/libcxx/headers_in_modulemap.sh.py
delete mode 100644 libcxx/test/libcxx/include_as_c.sh.cpp
delete mode 100644 libcxx/test/libcxx/no_assert_include.gen.py
diff --git a/libcxx/test/libcxx/clang_modules_include.gen.py b/libcxx/test/libcxx/clang_modules_include.gen.py
deleted file mode 100644
index f0421b2e738133..00000000000000
--- a/libcxx/test/libcxx/clang_modules_include.gen.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# ===----------------------------------------------------------------------===##
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-# ===----------------------------------------------------------------------===##
-
-# Test that we can include each header in a TU while using modules.
-# This is important notably because the LLDB data formatters use
-# libc++ headers with modules enabled.
-
-# RUN: %{python} %s %{libcxx-dir}/utils
-
-# block Lit from interpreting a RUN/XFAIL/etc inside the generation script
-# END.
-
-import sys
-sys.path.append(sys.argv[1])
-from libcxx.header_information import lit_header_restrictions, public_headers
-
-for header in public_headers:
- print(f"""\
-//--- {header}.compile.pass.cpp
-// RUN: %{{cxx}} %s %{{flags}} %{{compile_flags}} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only
-
-// GCC doesn't support -fcxx-modules
-// UNSUPPORTED: gcc
-
-// The Windows headers don't appear to be compatible with modules
-// UNSUPPORTED: windows
-// UNSUPPORTED: buildhost=windows
-
-// The Android headers don't appear to be compatible with modules yet
-// UNSUPPORTED: LIBCXX-ANDROID-FIXME
-
-// TODO: Investigate this failure
-// UNSUPPORTED: LIBCXX-FREEBSD-FIXME
-
-{lit_header_restrictions.get(header, '')}
-
-#include <{header}>
-""")
-
-print(f"""\
-//--- __std_clang_module.compile.pass.mm
-// RUN: %{{cxx}} %s %{{flags}} %{{compile_flags}} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only
-
-// REQUIRES: clang-modules-build
-
-// GCC doesn't support -fcxx-modules
-// UNSUPPORTED: gcc
-
-// The Windows headers don't appear to be compatible with modules
-// UNSUPPORTED: windows
-// UNSUPPORTED: buildhost=windows
-
-// The Android headers don't appear to be compatible with modules yet
-// UNSUPPORTED: LIBCXX-ANDROID-FIXME
-
-// TODO: Investigate this failure
-// UNSUPPORTED: LIBCXX-FREEBSD-FIXME
-
- at import std;
-
-""")
diff --git a/libcxx/test/libcxx/clang_tidy.gen.py b/libcxx/test/libcxx/clang_tidy.gen.py
deleted file mode 100644
index 5e84fbbb9913f3..00000000000000
--- a/libcxx/test/libcxx/clang_tidy.gen.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# ===----------------------------------------------------------------------===##
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-# ===----------------------------------------------------------------------===##
-
-# Run our custom libc++ clang-tidy checks on all public headers.
-
-# RUN: %{python} %s %{libcxx-dir}/utils
-
-# block Lit from interpreting a RUN/XFAIL/etc inside the generation script
-# END.
-
-import sys
-sys.path.append(sys.argv[1])
-from libcxx.header_information import lit_header_restrictions, public_headers
-
-for header in public_headers:
- print(f"""\
-//--- {header}.sh.cpp
-
-// REQUIRES: has-clang-tidy
-
-// The GCC compiler flags are not always compatible with clang-tidy.
-// UNSUPPORTED: gcc
-
-// Clang 17 has false positives.
-// UNSUPPORTED: clang-17
-
-{lit_header_restrictions.get(header, '')}
-
-// TODO: run clang-tidy with modules enabled once they are supported
-// RUN: %{{clang-tidy}} %s --warnings-as-errors=* -header-filter=.* --checks='-*,libcpp-*' --load=%{{test-tools-dir}}/clang_tidy_checks/libcxx-tidy.plugin -- %{{compile_flags}} -fno-modules
-// RUN: %{{clang-tidy}} %s --warnings-as-errors=* -header-filter=.* --config-file=%{{libcxx-dir}}/.clang-tidy -- -Wweak-vtables %{{compile_flags}} -fno-modules
-
-#include <{header}>
-""")
diff --git a/libcxx/test/libcxx/double_include.gen.py b/libcxx/test/libcxx/double_include.gen.py
deleted file mode 100644
index afc2947dbece94..00000000000000
--- a/libcxx/test/libcxx/double_include.gen.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# ===----------------------------------------------------------------------===##
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-# ===----------------------------------------------------------------------===##
-
-# Test that we can include each header in two TU's and link them together.
-
-# RUN: %{python} %s %{libcxx-dir}/utils
-
-# Block Lit from interpreting a RUN/XFAIL/etc inside the generation script.
-# END.
-
-import sys
-sys.path.append(sys.argv[1])
-from libcxx.header_information import lit_header_restrictions, public_headers
-
-for header in public_headers:
- print(f"""\
-//--- {header}.sh.cpp
-{lit_header_restrictions.get(header, '')}
-
-// RUN: %{{cxx}} -c %s -o %t.first.o %{{flags}} %{{compile_flags}}
-// RUN: %{{cxx}} -c %s -o %t.second.o -DWITH_MAIN %{{flags}} %{{compile_flags}}
-// RUN: %{{cxx}} -o %t.exe %t.first.o %t.second.o %{{flags}} %{{link_flags}}
-// RUN: %{{run}}
-
-#include <{header}>
-
-#if defined(WITH_MAIN)
-int main(int, char**) {{ return 0; }}
-#endif
-""")
diff --git a/libcxx/test/libcxx/header_inclusions.gen.py b/libcxx/test/libcxx/header_inclusions.gen.py
deleted file mode 100644
index 2ecc47cbb1891a..00000000000000
--- a/libcxx/test/libcxx/header_inclusions.gen.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# ===----------------------------------------------------------------------===##
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-# ===----------------------------------------------------------------------===##
-
-# Test that all headers include all the other headers they're supposed to, as
-# prescribed by the Standard.
-
-# RUN: %{python} %s %{libcxx-dir}/utils
-
-import sys
-sys.path.append(sys.argv[1])
-from libcxx.header_information import lit_header_restrictions, public_headers, mandatory_inclusions
-
-for header in public_headers:
- header_guard = lambda h: f"_LIBCPP_{h.upper().replace('.', '_').replace('/', '_')}"
-
- # <cassert> has no header guards
- if header == 'cassert':
- checks = ''
- else:
- checks = f'''
-#ifndef {header_guard(header)}
-# error <{header}> was expected to define a header guard {header_guard(header)}
-#endif
-'''
- for includee in mandatory_inclusions.get(header, []):
- checks += f'''
-#ifndef {header_guard(includee)}
-# error <{header}> was expected to include <{includee}>
-#endif
-'''
-
- print(f"""\
-//--- {header}.compile.pass.cpp
-{lit_header_restrictions.get(header, '')}
-
-#include <{header}>
-{checks}
-""")
diff --git a/libcxx/test/libcxx/headers_in_modulemap.sh.py b/libcxx/test/libcxx/headers_in_modulemap.sh.py
deleted file mode 100644
index 237b006115ccdf..00000000000000
--- a/libcxx/test/libcxx/headers_in_modulemap.sh.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# RUN: %{python} %s %{libcxx-dir}/utils %{include-dir}
-
-import sys
-
-sys.path.append(sys.argv[1])
-
-import pathlib
-import sys
-from libcxx.header_information import is_modulemap_header, is_header
-
-headers = list(pathlib.Path(sys.argv[2]).rglob("*"))
-modulemap = open(f"{sys.argv[2]}/module.modulemap").read()
-
-isHeaderMissing = False
-
-for header in headers:
- if not is_header(header):
- continue
-
- header = header.relative_to(pathlib.Path(sys.argv[2])).as_posix()
-
- if not is_modulemap_header(header):
- continue
-
- if not str(header) in modulemap:
- print(f"Header {header} seems to be missing from the modulemap!")
- isHeaderMissing = True
-
-if isHeaderMissing:
- exit(1)
diff --git a/libcxx/test/libcxx/include_as_c.sh.cpp b/libcxx/test/libcxx/include_as_c.sh.cpp
deleted file mode 100644
index c9f8dfd9a5a922..00000000000000
--- a/libcxx/test/libcxx/include_as_c.sh.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// We're building as C, so this test doesn't work when building with modules.
-// UNSUPPORTED: clang-modules-build
-
-// GCC complains about unrecognized arguments because we're compiling the
-// file as C, but we're passing C++ flags on the command-line.
-// UNSUPPORTED: gcc
-
-// Test that the C wrapper headers can be included when compiling them as C.
-
-// NOTE: It's not common or recommended to have libc++ in the header search
-// path when compiling C files, but it does happen often enough.
-
-// RUN: %{cxx} -c -xc %s -fsyntax-only %{flags} %{compile_flags} -std=c99
-
-#include <__config>
-
-#include <complex.h>
-#include <ctype.h>
-#include <errno.h>
-#include <fenv.h>
-#include <float.h>
-#include <inttypes.h>
-#include <limits.h>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-# include <locale.h>
-#endif
-#include <math.h>
-#include <setjmp.h>
-#include <stdatomic.h>
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-// The clang-shipped tgmath.h header doesn't work with MSVC/UCRT's complex
-// headers in C mode, see PR46207.
-#ifndef _MSC_VER
-# include <tgmath.h>
-#endif
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-# include <wchar.h>
-# include <wctype.h>
-#endif
-
-int main(int argc, char **argv) {
- (void)argc;
- (void)argv;
- return 0;
-}
diff --git a/libcxx/test/libcxx/no_assert_include.gen.py b/libcxx/test/libcxx/no_assert_include.gen.py
deleted file mode 100644
index 67ab98603ca8fd..00000000000000
--- a/libcxx/test/libcxx/no_assert_include.gen.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# ===----------------------------------------------------------------------===##
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-# ===----------------------------------------------------------------------===##
-
-# Ensure that none of the standard C++ headers implicitly include cassert or
-# assert.h (because assert() is implemented as a macro).
-
-# RUN: %{python} %s %{libcxx-dir}/utils
-
-import sys
-sys.path.append(sys.argv[1])
-from libcxx.header_information import lit_header_restrictions, public_headers
-
-for header in public_headers:
- if header == 'cassert':
- continue
-
- print(f"""\
-//--- {header}.compile.pass.cpp
-{lit_header_restrictions.get(header, '')}
-
-#include <{header}>
-
-#ifdef assert
-# error "Do not include cassert or assert.h in standard header files"
-#endif
-""")
More information about the libcxx-commits
mailing list