Skip to content

[libc++] Add CI job for testing macOS C++03 #75355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions libcxx/include/deque
Original file line number Diff line number Diff line change
Expand Up @@ -967,12 +967,18 @@ public:
// For more details, see the "Using libc++" documentation page or
// the documentation for __sanitizer_annotate_contiguous_container.
_LIBCPP_HIDE_FROM_ABI void __annotate_double_ended_contiguous_container(
[[__maybe_unused__]] const void* __beg,
[[__maybe_unused__]] const void* __end,
[[__maybe_unused__]] const void* __old_con_beg,
[[__maybe_unused__]] const void* __old_con_end,
[[__maybe_unused__]] const void* __new_con_beg,
[[__maybe_unused__]] const void* __new_con_end) const {
const void* __beg,
const void* __end,
const void* __old_con_beg,
const void* __old_con_end,
const void* __new_con_beg,
const void* __new_con_end) const {
(void)__beg;
(void)__end;
(void)__old_con_beg;
(void)__old_con_end;
(void)__new_con_beg;
(void)__new_con_end;
#ifndef _LIBCPP_HAS_NO_ASAN
if (__beg != nullptr && __asan_annotate_container_with_allocator<_Allocator>::value)
__sanitizer_annotate_double_ended_contiguous_container(
Expand All @@ -982,10 +988,14 @@ public:

_LIBCPP_HIDE_FROM_ABI
void __annotate_from_to(
[[__maybe_unused__]] size_type __beg,
[[__maybe_unused__]] size_type __end,
[[__maybe_unused__]] __asan_annotation_type __annotation_type,
[[__maybe_unused__]] __asan_annotation_place __place) const _NOEXCEPT {
size_type __beg,
size_type __end,
__asan_annotation_type __annotation_type,
__asan_annotation_place __place) const _NOEXCEPT {
(void)__beg;
(void)__end;
(void)__annotation_type;
(void)__place;
#ifndef _LIBCPP_HAS_NO_ASAN
// __beg - index of the first item to annotate
// __end - index behind the last item to annotate (so last item + 1)
Expand Down
5 changes: 3 additions & 2 deletions libcxx/include/string
Original file line number Diff line number Diff line change
Expand Up @@ -1917,8 +1917,9 @@ private:
{return __is_long() ? __get_long_pointer() : __get_short_pointer();}

// The following functions are no-ops outside of AddressSanitizer mode.
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_contiguous_container(
[[__maybe_unused__]] const void* __old_mid, [[__maybe_unused__]] const void* __new_mid) const {
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_contiguous_container(const void* __old_mid, const void* __new_mid) const {
(void)__old_mid;
(void)__new_mid;
#if !defined(_LIBCPP_HAS_NO_ASAN) && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
const void* __begin = data();
const void* __end = data() + capacity() + 1;
Expand Down
14 changes: 9 additions & 5 deletions libcxx/include/vector
Original file line number Diff line number Diff line change
Expand Up @@ -852,11 +852,15 @@ private:
// the documentation for __sanitizer_annotate_contiguous_container.

_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __annotate_contiguous_container([[__maybe_unused__]] const void *__beg,
[[__maybe_unused__]] const void *__end,
[[__maybe_unused__]] const void *__old_mid,
[[__maybe_unused__]] const void *__new_mid) const
{
void __annotate_contiguous_container(const void *__beg,
const void *__end,
const void *__old_mid,
const void *__new_mid) const
{
(void)__beg;
(void)__end;
(void)__old_mid;
(void)__new_mid;
#ifndef _LIBCPP_HAS_NO_ASAN
if (!__libcpp_is_constant_evaluated() && __beg != nullptr && __asan_annotate_container_with_allocator<_Allocator>::value)
__sanitizer_annotate_contiguous_container(__beg, __end, __old_mid, __new_mid);
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/support/assert_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void test_log(const char* condition, const char* file, int line, const F& functo
}

template <class Arg>
[[noreturn]] void test_fail(const char* file, int line, const Arg& arg) {
TEST_NORETURN void test_fail(const char* file, int line, const Arg& arg) {
test_log("", file, line, arg);
std::abort();
}
Expand Down
5 changes: 5 additions & 0 deletions libcxx/utils/ci/buildkite-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ steps:
<<: *mac_agent_any_arch
<<: *common

- label: MacOS with C++03
command: libcxx/utils/ci/run-buildbot generic-cxx03
<<: *mac_agent_any_arch
<<: *common

# Build with the configuration we use to generate libc++.dylib on Apple platforms
- label: Apple system
command: libcxx/utils/ci/run-buildbot apple-system
Expand Down