diff options
Diffstat (limited to 'libcxx/utils')
-rw-r--r-- | libcxx/utils/ci/Dockerfile | 22 | ||||
-rw-r--r-- | libcxx/utils/ci/docker-compose.yml | 14 | ||||
-rwxr-xr-x | libcxx/utils/ci/run-buildbot | 6 | ||||
-rw-r--r-- | libcxx/utils/generate_feature_test_macro_components.py | 2 | ||||
-rw-r--r-- | libcxx/utils/libcxx/test/params.py | 19 |
5 files changed, 56 insertions, 7 deletions
diff --git a/libcxx/utils/ci/Dockerfile b/libcxx/utils/ci/Dockerfile index 63cecea..79e1156 100644 --- a/libcxx/utils/ci/Dockerfile +++ b/libcxx/utils/ci/Dockerfile @@ -38,6 +38,7 @@ # If you're only looking to run the Docker image locally for debugging a # build bot, see the `run-buildbot-container` script located in this directory. +ARG ACTIONS_BASE_IMAGE # HACK: We set the base image in the docker-compose file depending on the final target (buildkite vs github actions). # This means we have a much slower container build, but we can use the same Dockerfile for both targets. @@ -309,7 +310,20 @@ CMD /opt/android/container-setup.sh && buildkite-agent start # # IMAGE: ghcr.io/libcxx/actions-builder. # -FROM builder-base AS actions-builder - -WORKDIR /home/runner -USER runner +FROM $ACTIONS_BASE_IMAGE AS actions-builder + +ARG GITHUB_RUNNER_VERSION + +RUN useradd gha -u 1001 -m -s /bin/bash +RUN adduser gha sudo +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers +WORKDIR /home/gha +USER gha + +ENV RUNNER_MANUALLY_TRAP_SIG=1 +ENV ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT=1 +RUN mkdir actions-runner && \ + cd actions-runner && \ + curl -O -L https://github.com/actions/runner/releases/download/v$GITHUB_RUNNER_VERSION/actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \ + tar xzf ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \ + rm ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz diff --git a/libcxx/utils/ci/docker-compose.yml b/libcxx/utils/ci/docker-compose.yml index 4efc6d2..36b8dd7 100644 --- a/libcxx/utils/ci/docker-compose.yml +++ b/libcxx/utils/ci/docker-compose.yml @@ -3,6 +3,16 @@ x-versions: &compiler_versions LLVM_HEAD_VERSION: 21 services: + builder-base: + image: ghcr.io/llvm/libcxx-linux-builder-base:${TAG} + build: + context: . + dockerfile: Dockerfile + target: builder-base + args: + BASE_IMAGE: ubuntu:jammy + <<: *compiler_versions + actions-builder: image: ghcr.io/llvm/libcxx-linux-builder:${TAG} build: @@ -10,7 +20,9 @@ services: dockerfile: Dockerfile target: actions-builder args: - BASE_IMAGE: ghcr.io/actions/actions-runner:2.326.0 + BASE_IMAGE: ubuntu:jammy + ACTIONS_BASE_IMAGE: builder-base + GITHUB_RUNNER_VERSION: "2.326.0" <<: *compiler_versions android-buildkite-builder: diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot index d8b23be..57ecf1e 100755 --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils/ci/run-buildbot @@ -442,6 +442,12 @@ generic-hardening-mode-extensive) check-runtimes check-abi-list ;; +generic-hardening-mode-extensive-observe-semantic) + clean + generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-hardening-mode-extensive-observe-semantic.cmake" + check-runtimes + check-abi-list +;; generic-hardening-mode-debug) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-hardening-mode-debug.cmake" diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py index fe175fd7..d9317e0 100644 --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -442,11 +442,9 @@ feature_test_macros = [ { "name": "__cpp_lib_constrained_equality", "values": { - # "c++26": 202403, # P2944R3: Comparisons for reference_wrapper "c++26": 202411, # P3379R0: Constrain std::expected equality operators }, "headers": ["expected", "optional", "tuple", "utility", "variant"], - "unimplemented": True, }, { "name": "__cpp_lib_containers_ranges", diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py index 93cf29b..81c6134 100644 --- a/libcxx/utils/libcxx/test/params.py +++ b/libcxx/utils/libcxx/test/params.py @@ -455,5 +455,24 @@ DEFAULT_PARAMETERS = [ help="Whether to test the main or C++03-specific headers. Only changes behaviour when std=c++03.", actions=lambda enabled: [] if not enabled else [AddFlag("-D_LIBCPP_USE_FROZEN_CXX03_HEADERS"), AddFeature("FROZEN-CXX03-HEADERS-FIXME")], ), + Parameter( + name='assertion_semantic', + choices=["ignore", "observe", "quick_enforce", "enforce", "undefined"], + type=str, + default="undefined", + help="Whether to override the assertion semantic used by hardening. This is only meaningful when running the " + "tests against libc++ with hardening enabled. By default, no assertion semantic is specified explicitly, so " + "the default one will be used (depending on the hardening mode).", + actions=lambda assertion_semantic: filter( + None, + [ + AddCompileFlag("-D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_IGNORE") if assertion_semantic == "ignore" else None, + AddCompileFlag("-D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_OBSERVE") if assertion_semantic == "observe" else None, + AddCompileFlag("-D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_QUICK_ENFORCE") if assertion_semantic == "quick_enforce" else None, + AddCompileFlag("-D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_ENFORCE") if assertion_semantic == "enforce" else None, + AddFeature("libcpp-assertion-semantic={}".format(assertion_semantic)) if assertion_semantic != "undefined" else None, + ], + ), + ), ] # fmt: on |