[libcxx-commits] [libcxx] Change 'grow_by' to use precise size for the first SSO --> long allocation (PR #69967)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 25 11:15:09 PDT 2023
https://github.com/EricWF updated https://github.com/llvm/llvm-project/pull/69967
>From 5d7a41f7563b05d2ed75743643d90d7466711213 Mon Sep 17 00:00:00 2001
From: Eric Fiselier <eric at efcs.ca>
Date: Mon, 23 Oct 2023 16:32:09 -0400
Subject: [PATCH] Change 'grow_by' to use precise size for the first SSO -->
long allocation
The logic currently always at least doubles the capacity on growth.
However, the SSO size is an implementation detail, and represents
nothing about the usage pattern of the string (unlike long capacities).
Further this causes any short or empty initialized string exceeding
22 bytes to be allocated to at least 48 bytes. (22 * 2 rounded up to 48).
This is wasteful as there are likely plenty of strings that could be allocated
into 40 (glibc) or 32 (tcmalloc) sized allocs.
This patch was originally from mvels.
---
libcxx/include/string | 22 +-
.../string.capacity/allocation_size.pass.cpp | 22 +-
libcxx/utils/ci/buildkite-pipeline.yml | 1050 -----------------
3 files changed, 35 insertions(+), 1059 deletions(-)
diff --git a/libcxx/include/string b/libcxx/include/string
index 91935162f02383a..14c681db3e98c6a 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -2311,10 +2311,13 @@ basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace
size_type __ms = max_size();
if (__delta_cap > __ms - __old_cap - 1)
__throw_length_error();
- pointer __old_p = __get_pointer();
- size_type __cap = __old_cap < __ms / 2 - __alignment ?
- __recommend(std::max(__old_cap + __delta_cap, 2 * __old_cap)) :
- __ms - 1;
+ const bool __was_short = !__is_long();
+ pointer __old_p = __was_short ? __get_short_pointer() : __get_long_pointer();
+ size_type __cap =
+ __was_short
+ ? __recommend(__old_cap + __delta_cap)
+ : (__old_cap < __ms / 2 - __alignment ? __recommend(std::max(__old_cap + __delta_cap, 2 * __old_cap))
+ : __ms - 1);
auto __allocation = std::__allocate_at_least(__alloc(), __cap + 1);
pointer __p = __allocation.ptr;
__begin_lifetime(__p, __allocation.count);
@@ -2352,10 +2355,13 @@ basic_string<_CharT, _Traits, _Allocator>::__grow_by(size_type __old_cap, size_t
size_type __ms = max_size();
if (__delta_cap > __ms - __old_cap)
__throw_length_error();
- pointer __old_p = __get_pointer();
- size_type __cap = __old_cap < __ms / 2 - __alignment ?
- __recommend(std::max(__old_cap + __delta_cap, 2 * __old_cap)) :
- __ms - 1;
+ const bool __was_short = !__is_long();
+ pointer __old_p = __was_short ? __get_short_pointer() : __get_long_pointer();
+ size_type __cap =
+ __was_short
+ ? __recommend(__old_cap + __delta_cap)
+ : (__old_cap < __ms / 2 - __alignment ? __recommend(std::max(__old_cap + __delta_cap, 2 * __old_cap))
+ : __ms - 1);
auto __allocation = std::__allocate_at_least(__alloc(), __cap + 1);
pointer __p = __allocation.ptr;
__begin_lifetime(__p, __allocation.count);
diff --git a/libcxx/test/libcxx/strings/basic.string/string.capacity/allocation_size.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.capacity/allocation_size.pass.cpp
index c7df56c815a8054..9767ef91f82ed00 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.capacity/allocation_size.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.capacity/allocation_size.pass.cpp
@@ -14,6 +14,7 @@
#include <cassert>
#include <cstddef>
#include <string>
+#include <iostream>
#include "test_macros.h"
@@ -26,7 +27,7 @@ const std::size_t alignment =
16;
#endif
-int main(int, char**) {
+void test_size_wrt_alignment() {
std::string input_string;
input_string.resize(64, 'a');
@@ -40,6 +41,25 @@ int main(int, char**) {
} else {
assert(test_string.capacity() == expected_align8_size + 8);
}
+}
+
+void test_resize_from_small_size() {
+ // Test that we don't waste additional bytes when growing from the SSO
+ // to a specific size. The size of the SSO is an implementation detail
+ // and shouldn't be taken into account when deciding on the next size.
+ {
+ const std::size_t sso_capacity = std::string().capacity();
+ const std::string input(sso_capacity, 'a');
+ std::string s;
+ s = input.c_str();
+ std::cout << "Have capacity = " << s.capacity() << " and size = " << s.size() << std::endl;
+ assert(s.capacity() == input.size());
+ }
+}
+
+int main(int, char**) {
+ test_size_wrt_alignment();
+ test_resize_from_small_size();
return 0;
}
diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index 460c5a8c4301dc4..dfe94624819b178 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -29,1036 +29,6 @@ env:
LLVM_HEAD_VERSION: "18" # Used compiler, update POST-BRANCH.
GCC_STABLE_VERSION: "13"
steps:
- #
- # Light pre-commit tests for things like forgetting to update generated files.
- #
- - label: "Documentation"
- command: "libcxx/utils/ci/run-buildbot documentation"
- artifact_paths:
- - "**/test-results.xml"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- #
- # General testing with the default configuration, under all the supported
- # Standard modes, with Clang and GCC. This catches most issues upfront.
- # The goal of this step is to catch most issues while being very fast.
- #
- - wait
-
- - label: "GCC ${GCC_STABLE_VERSION} / C++latest"
- command: "libcxx/utils/ci/run-buildbot generic-gcc"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "gcc-${GCC_STABLE_VERSION}"
- CXX: "g++-${GCC_STABLE_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "C++26"
- command: "libcxx/utils/ci/run-buildbot generic-cxx26"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- # Note modules require and absolute path for clang-scan-deps
- # https://github.com/llvm/llvm-project/issues/61006
- CC: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang"
- CXX: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++"
- CMAKE: "/opt/bin/cmake"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Modular build"
- command: "libcxx/utils/ci/run-buildbot generic-modules"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "C++11"
- command: "libcxx/utils/ci/run-buildbot generic-cxx11"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "C++03"
- command: "libcxx/utils/ci/run-buildbot generic-cxx03"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- #
- # All other supported configurations of libc++.
- #
- - wait
-
- - label: "C++23"
- command: "libcxx/utils/ci/run-buildbot generic-cxx23"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- # Note: Modules require and absolute path for clang-scan-deps
- # https://github.com/llvm/llvm-project/issues/61006
- CC: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang"
- CXX: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++"
- CMAKE: "/opt/bin/cmake"
- ENABLE_CLANG_TIDY: "On"
- ENABLE_STD_MODULES: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "C++20"
- command: "libcxx/utils/ci/run-buildbot generic-cxx20"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- # Note: Modules require and absolute path for clang-scan-deps
- # https://github.com/llvm/llvm-project/issues/61006
- CC: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang"
- CXX: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++"
- CMAKE: "/opt/bin/cmake"
- ENABLE_CLANG_TIDY: "On"
- ENABLE_STD_MODULES: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "C++17"
- command: "libcxx/utils/ci/run-buildbot generic-cxx17"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "C++14"
- command: "libcxx/utils/ci/run-buildbot generic-cxx14"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- # Tests with the supported compilers.
- - label: "GCC ${GCC_STABLE_VERSION} / C++11"
- command: "libcxx/utils/ci/run-buildbot generic-gcc-cxx11"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "gcc-${GCC_STABLE_VERSION}"
- CXX: "g++-${GCC_STABLE_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Clang 16"
- command: "libcxx/utils/ci/run-buildbot generic-cxx23"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-16"
- CXX: "clang++-16"
- ENABLE_CLANG_TIDY: "On"
- ENABLE_STD_MODULES: "Off"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Clang 17"
- command: "libcxx/utils/ci/run-buildbot generic-cxx23"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- # Note: Modules require and absolute path for clang-scan-deps
- # https://github.com/llvm/llvm-project/issues/61006
- CC: "/usr/lib/llvm-17/bin/clang"
- CXX: "/usr/lib/llvm-17/bin/clang++"
- CMAKE: "/opt/bin/cmake"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- # Tests with the sanitizers.
- - group: "Sanitizers"
- steps:
- - label: "ASAN"
- command: "libcxx/utils/ci/run-buildbot generic-asan"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "TSAN"
- command: "libcxx/utils/ci/run-buildbot generic-tsan"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "UBSAN"
- command: "libcxx/utils/ci/run-buildbot generic-ubsan"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "MSAN"
- command: "libcxx/utils/ci/run-buildbot generic-msan"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- # Tests with the various supported ways to build libc++.
- - label: "Bootstrapping build"
- command: "libcxx/utils/ci/run-buildbot bootstrapping-build"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- - "**/crash_diagnostics/*"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- LLVM_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer-${LLVM_HEAD_VERSION}"
- CLANG_CRASH_DIAGNOSTICS_DIR: "crash_diagnostics"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- # Tests with various build configurations.
- - label: "Static libraries"
- command: "libcxx/utils/ci/run-buildbot generic-static"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Shared library with merged ABI and unwinder libraries"
- command: "libcxx/utils/ci/run-buildbot generic-merged"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Hardened mode"
- command: "libcxx/utils/ci/run-buildbot generic-hardened-mode"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Safe mode"
- command: "libcxx/utils/ci/run-buildbot generic-safe-mode"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- # Note: Modules require an absolute path for `clang-scan-deps` (see
- # https://github.com/llvm/llvm-project/issues/61006).
- CC: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang"
- CXX: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++"
- CMAKE: "/opt/bin/cmake"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Debug mode"
- command: "libcxx/utils/ci/run-buildbot generic-debug-mode"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "With LLVM's libunwind"
- command: "libcxx/utils/ci/run-buildbot generic-with_llvm_unwinder"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Modular build with Local Submodule Visibility"
- command: "libcxx/utils/ci/run-buildbot generic-modules-lsv"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - group: "Parts disabled"
- steps:
- - label: "No threads"
- command: "libcxx/utils/ci/run-buildbot generic-no-threads"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- # Note: Modules require and absolute path for clang-scan-deps
- # https://github.com/llvm/llvm-project/issues/61006
- CC: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang"
- CXX: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++"
- CMAKE: "/opt/bin/cmake"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "No filesystem"
- command: "libcxx/utils/ci/run-buildbot generic-no-filesystem"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- # Note: Modules require and absolute path for clang-scan-deps
- # https://github.com/llvm/llvm-project/issues/61006
- CC: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang"
- CXX: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++"
- CMAKE: "/opt/bin/cmake"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "No random device"
- command: "libcxx/utils/ci/run-buildbot generic-no-random_device"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- # Note: Modules require and absolute path for clang-scan-deps
- # https://github.com/llvm/llvm-project/issues/61006
- CC: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang"
- CXX: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++"
- CMAKE: "/opt/bin/cmake"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "No locale"
- command: "libcxx/utils/ci/run-buildbot generic-no-localization"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- # Note: Modules require and absolute path for clang-scan-deps
- # https://github.com/llvm/llvm-project/issues/61006
- CC: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang"
- CXX: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++"
- CMAKE: "/opt/bin/cmake"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "No Unicode"
- command: "libcxx/utils/ci/run-buildbot generic-no-unicode"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- # Note: Modules require and absolute path for clang-scan-deps
- # https://github.com/llvm/llvm-project/issues/61006
- CC: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang"
- CXX: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++"
- CMAKE: "/opt/bin/cmake"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "No wide characters"
- command: "libcxx/utils/ci/run-buildbot generic-no-wide-characters"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- # Note: Modules require and absolute path for clang-scan-deps
- # https://github.com/llvm/llvm-project/issues/61006
- CC: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang"
- CXX: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++"
- CMAKE: "/opt/bin/cmake"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "No time zone database"
- command: "libcxx/utils/ci/run-buildbot generic-no-tzdb"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "No experimental features"
- command: "libcxx/utils/ci/run-buildbot generic-no-experimental"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- # Note: Modules require and absolute path for clang-scan-deps
- # https://github.com/llvm/llvm-project/issues/61006
- CC: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang"
- CXX: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++"
- CMAKE: "/opt/bin/cmake"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "No exceptions"
- command: "libcxx/utils/ci/run-buildbot generic-no-exceptions"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- # Note: Modules require and absolute path for clang-scan-deps
- # https://github.com/llvm/llvm-project/issues/61006
- CC: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang"
- CXX: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++"
- CMAKE: "/opt/bin/cmake"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Unstable ABI"
- command: "libcxx/utils/ci/run-buildbot generic-abi-unstable"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- # Other non-testing CI jobs
- - label: "Benchmarks"
- command: "libcxx/utils/ci/run-buildbot benchmarks"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang-${LLVM_HEAD_VERSION}"
- CXX: "clang++-${LLVM_HEAD_VERSION}"
- ENABLE_CLANG_TIDY: "On"
- agents:
- queue: "libcxx-builders"
- os: "linux"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- # Tests on non-Unix platforms
- - group: ":windows: Windows"
- steps:
- - label: "Clang-cl (DLL)"
- command: "bash libcxx/utils/ci/run-buildbot clang-cl-dll"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "windows"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Clang-cl (Static)"
- command: "bash libcxx/utils/ci/run-buildbot clang-cl-static"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "windows"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Clang-cl (no vcruntime exceptions)"
- command: "bash libcxx/utils/ci/run-buildbot clang-cl-no-vcruntime"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "windows"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
-
- - label: "Clang-cl (Debug mode)"
- command: "bash libcxx/utils/ci/run-buildbot clang-cl-debug"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "windows"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Clang-cl (Static CRT)"
- command: "bash libcxx/utils/ci/run-buildbot clang-cl-static-crt"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "windows"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "MinGW (DLL, x86_64)"
- command: "bash libcxx/utils/ci/run-buildbot mingw-dll"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "windows"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "MinGW (Static, x86_64)"
- command: "bash libcxx/utils/ci/run-buildbot mingw-static"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "windows"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "MinGW (DLL, i686)"
- command: "bash libcxx/utils/ci/run-buildbot mingw-dll-i686"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "windows"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - group: ":mac: Apple"
- steps:
- - label: "MacOS x86_64"
- command: "libcxx/utils/ci/run-buildbot generic-cxx23"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "libcxx-builders"
- os: "macos"
- arch: "x86_64"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "MacOS arm64"
- command: "libcxx/utils/ci/run-buildbot generic-cxx23"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "libcxx-builders"
- os: "macos"
- arch: "arm64"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "MacOS with Modules"
- command: "libcxx/utils/ci/run-buildbot generic-modules"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "libcxx-builders"
- os: "macos"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- # Build with the configuration we use to generate libc++.dylib on Apple platforms
- - label: "Apple system"
- command: "libcxx/utils/ci/run-buildbot apple-system"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "libcxx-builders"
- os: "macos"
- arch: "arm64" # This can technically run on any architecture, but we have more resources on arm64 so we pin this job to arm64
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- # Test back-deployment to older Apple platforms
- - label: "Apple back-deployment macosx10.13"
- command: "libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.13"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "libcxx-builders"
- os: "macos"
- arch: "x86_64" # We need to use x86_64 for back-deployment CI on this target since macOS didn't support arm64 back then.
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Apple back-deployment macosx10.15"
- command: "libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.15"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "libcxx-builders"
- os: "macos"
- arch: "x86_64" # We need to use x86_64 for back-deployment CI on this target since macOS didn't support arm64 back then.
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- # TODO: Re-enable this once we've figured out how to run back-deployment testing on arm64 on recent OSes
- # - label: "Apple back-deployment macosx11.0 arm64"
- # command: "libcxx/utils/ci/run-buildbot apple-system-backdeployment-11.0"
- # artifact_paths:
- # - "**/test-results.xml"
- # - "**/*.abilist"
- # agents:
- # queue: "libcxx-builders"
- # os: "macos"
- # arch: "arm64"
- # retry:
- # automatic:
- # - exit_status: -1 # Agent was lost
- # limit: 2
- # timeout_in_minutes: 120
-
- - label: "Apple back-deployment with hardening enabled"
- command: "libcxx/utils/ci/run-buildbot apple-system-backdeployment-hardened-11.0"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "libcxx-builders"
- os: "macos"
- arch: "x86_64" # TODO: Remove this once we are able to run back-deployment on arm64 again, since this isn't x86_64 specific
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - group: "ARM"
- steps:
- - label: "AArch64"
- command: "libcxx/utils/ci/run-buildbot aarch64"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "libcxx-builders-linaro-arm"
- arch: "aarch64"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "AArch64 -fno-exceptions"
- command: "libcxx/utils/ci/run-buildbot aarch64-no-exceptions"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "libcxx-builders-linaro-arm"
- arch: "aarch64"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Armv8"
- command: "libcxx/utils/ci/run-buildbot armv8"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "libcxx-builders-linaro-arm"
- arch: "armv8l"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Armv8 -fno-exceptions"
- command: "libcxx/utils/ci/run-buildbot armv8-no-exceptions"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "libcxx-builders-linaro-arm"
- arch: "armv8l"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Armv7"
- command: "libcxx/utils/ci/run-buildbot armv7"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "libcxx-builders-linaro-arm"
- arch: "armv8l" # Compiling for v7, running on v8 hardware
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- - label: "Armv7 -fno-exceptions"
- command: "libcxx/utils/ci/run-buildbot armv7-no-exceptions"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- agents:
- queue: "libcxx-builders-linaro-arm"
- arch: "armv8l" # Compiling for v7, running on v8 hardware
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
-
- group: "AIX"
steps:
- label: "AIX (32-bit)"
@@ -1096,23 +66,3 @@ steps:
- exit_status: -1 # Agent was lost
limit: 2
timeout_in_minutes: 120
-
- - group: ":freebsd: FreeBSD"
- steps:
- - label: "FreeBSD 13 amd64"
- command: "libcxx/utils/ci/run-buildbot generic-cxx23"
- artifact_paths:
- - "**/test-results.xml"
- - "**/*.abilist"
- env:
- CC: "clang16"
- CXX: "clang++16"
- ENABLE_STD_MODULES: "Off"
- agents:
- queue: "libcxx-builders"
- os: "freebsd"
- retry:
- automatic:
- - exit_status: -1 # Agent was lost
- limit: 2
- timeout_in_minutes: 120
More information about the libcxx-commits
mailing list