Skip to content
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

[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration #98075

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

petrhosek
Copy link
Member

This is a part of #97655.

@petrhosek petrhosek added the libc label Jul 8, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Jul 8, 2024

@llvm/pr-subscribers-backend-amdgpu

@llvm/pr-subscribers-libc

Author: Petr Hosek (petrhosek)

Changes

This is a part of #97655.


Patch is 1.25 MiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/98075.diff

2300 Files Affected:

  • (modified) libc/benchmarks/LibcDefaultImplementations.cpp (+2-2)
  • (modified) libc/benchmarks/LibcMemoryBenchmarkMain.cpp (+2-2)
  • (modified) libc/benchmarks/automemcpy/lib/CodeGen.cpp (+2-2)
  • (modified) libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp (+2-2)
  • (modified) libc/benchmarks/gpu/BenchmarkLogger.cpp (+2-2)
  • (modified) libc/benchmarks/gpu/BenchmarkLogger.h (+2-2)
  • (modified) libc/benchmarks/gpu/LibcGpuBenchmark.cpp (+2-2)
  • (modified) libc/benchmarks/gpu/LibcGpuBenchmark.h (+2-2)
  • (modified) libc/benchmarks/gpu/timing/nvptx/timing.h (+2-2)
  • (modified) libc/config/linux/app.h (+2-2)
  • (modified) libc/fuzzing/__support/hashtable_fuzz.cpp (+2-2)
  • (modified) libc/src/__support/CPP/algorithm.h (+2-2)
  • (modified) libc/src/__support/CPP/array.h (+2-2)
  • (modified) libc/src/__support/CPP/atomic.h (+2-2)
  • (modified) libc/src/__support/CPP/bit.h (+4-2)
  • (modified) libc/src/__support/CPP/bitset.h (+4-2)
  • (modified) libc/src/__support/CPP/cstddef.h (+4-2)
  • (modified) libc/src/__support/CPP/expected.h (+4-2)
  • (modified) libc/src/__support/CPP/functional.h (+2-2)
  • (modified) libc/src/__support/CPP/iterator.h (+2-2)
  • (modified) libc/src/__support/CPP/limits.h (+2-2)
  • (modified) libc/src/__support/CPP/mutex.h (+2-2)
  • (modified) libc/src/__support/CPP/new.h (+2-2)
  • (modified) libc/src/__support/CPP/optional.h (+2-2)
  • (modified) libc/src/__support/CPP/span.h (+4-2)
  • (modified) libc/src/__support/CPP/string.h (+2-2)
  • (modified) libc/src/__support/CPP/string_view.h (+2-2)
  • (modified) libc/src/__support/CPP/stringstream.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/add_lvalue_reference.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/add_pointer.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/add_rvalue_reference.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/aligned_storage.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/always_false.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/bool_constant.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/conditional.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/decay.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/enable_if.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/false_type.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/integral_constant.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/invoke.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/invoke_result.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_arithmetic.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_array.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_base_of.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_class.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_const.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_constant_evaluated.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_convertible.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_destructible.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_enum.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_fixed_point.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_floating_point.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_function.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_integral.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_lvalue_reference.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_member_pointer.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_null_pointer.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_object.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_pointer.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_reference.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_rvalue_reference.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_same.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_scalar.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_signed.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_trivially_constructible.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_trivially_copyable.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_trivially_destructible.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_union.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_unsigned.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/is_void.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/make_signed.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/make_unsigned.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/remove_all_extents.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/remove_cv.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/remove_cvref.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/remove_extent.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/remove_reference.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/true_type.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/type_identity.h (+4-2)
  • (modified) libc/src/__support/CPP/type_traits/void_t.h (+4-2)
  • (modified) libc/src/__support/CPP/utility/declval.h (+4-2)
  • (modified) libc/src/__support/CPP/utility/forward.h (+4-2)
  • (modified) libc/src/__support/CPP/utility/in_place.h (+4-2)
  • (modified) libc/src/__support/CPP/utility/integer_sequence.h (+4-2)
  • (modified) libc/src/__support/CPP/utility/move.h (+4-2)
  • (modified) libc/src/__support/FPUtil/BasicOperations.h (+2-2)
  • (modified) libc/src/__support/FPUtil/DivisionAndRemainderOperations.h (+2-2)
  • (modified) libc/src/__support/FPUtil/FEnvImpl.h (+8-4)
  • (modified) libc/src/__support/FPUtil/FMA.h (+2-2)
  • (modified) libc/src/__support/FPUtil/FPBits.h (+2-2)
  • (modified) libc/src/__support/FPUtil/Hypot.h (+2-2)
  • (modified) libc/src/__support/FPUtil/ManipulationFunctions.h (+2-2)
  • (modified) libc/src/__support/FPUtil/NearestIntegerOperations.h (+2-2)
  • (modified) libc/src/__support/FPUtil/NormalFloat.h (+2-2)
  • (modified) libc/src/__support/FPUtil/PolyEval.h (+2-2)
  • (modified) libc/src/__support/FPUtil/aarch64/FEnvImpl.h (+2-2)
  • (modified) libc/src/__support/FPUtil/aarch64/fenv_darwin_impl.h (+2-2)
  • (modified) libc/src/__support/FPUtil/aarch64/nearest_integer.h (+2-2)
  • (modified) libc/src/__support/FPUtil/aarch64/sqrt.h (+2-2)
  • (modified) libc/src/__support/FPUtil/arm/FEnvImpl.h (+2-2)
  • (modified) libc/src/__support/FPUtil/double_double.h (+4-2)
  • (modified) libc/src/__support/FPUtil/dyadic_float.h (+4-2)
  • (modified) libc/src/__support/FPUtil/except_value_utils.h (+2-2)
  • (modified) libc/src/__support/FPUtil/fpbits_str.h (+2-2)
  • (modified) libc/src/__support/FPUtil/generic/FMA.h (+2-2)
  • (modified) libc/src/__support/FPUtil/generic/FMod.h (+2-2)
  • (modified) libc/src/__support/FPUtil/generic/add_sub.h (+4-2)
  • (modified) libc/src/__support/FPUtil/generic/div.h (+4-2)
  • (modified) libc/src/__support/FPUtil/generic/sqrt.h (+2-2)
  • (modified) libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h (+2-2)
  • (modified) libc/src/__support/FPUtil/multiply_add.h (+4-4)
  • (modified) libc/src/__support/FPUtil/nearest_integer.h (+2-2)
  • (modified) libc/src/__support/FPUtil/riscv/FEnvImpl.h (+2-2)
  • (modified) libc/src/__support/FPUtil/riscv/sqrt.h (+2-2)
  • (modified) libc/src/__support/FPUtil/rounding_mode.h (+4-2)
  • (modified) libc/src/__support/FPUtil/triple_double.h (+4-2)
  • (modified) libc/src/__support/FPUtil/x86_64/FEnvImpl.h (+2-2)
  • (modified) libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h (+2-2)
  • (modified) libc/src/__support/FPUtil/x86_64/NextUpDownLongDouble.h (+4-2)
  • (modified) libc/src/__support/FPUtil/x86_64/nearest_integer.h (+2-2)
  • (modified) libc/src/__support/FPUtil/x86_64/sqrt.h (+2-2)
  • (modified) libc/src/__support/File/dir.cpp (+2-2)
  • (modified) libc/src/__support/File/dir.h (+2-2)
  • (modified) libc/src/__support/File/file.cpp (+2-2)
  • (modified) libc/src/__support/File/file.h (+2-2)
  • (modified) libc/src/__support/File/linux/dir.cpp (+2-2)
  • (modified) libc/src/__support/File/linux/file.cpp (+2-2)
  • (modified) libc/src/__support/File/linux/file.h (+2-2)
  • (modified) libc/src/__support/File/linux/lseekImpl.h (+2-2)
  • (modified) libc/src/__support/File/linux/stderr.cpp (+2-2)
  • (modified) libc/src/__support/File/linux/stdin.cpp (+2-2)
  • (modified) libc/src/__support/File/linux/stdout.cpp (+2-2)
  • (modified) libc/src/__support/GPU/allocator.cpp (+2-2)
  • (modified) libc/src/__support/GPU/allocator.h (+2-2)
  • (modified) libc/src/__support/GPU/amdgpu/utils.h (+2-2)
  • (modified) libc/src/__support/GPU/generic/utils.h (+2-2)
  • (modified) libc/src/__support/GPU/nvptx/utils.h (+2-2)
  • (modified) libc/src/__support/GPU/utils.h (+2-2)
  • (modified) libc/src/__support/HashTable/bitmask.h (+2-2)
  • (modified) libc/src/__support/HashTable/randomness.h (+2-2)
  • (modified) libc/src/__support/HashTable/table.h (+2-2)
  • (modified) libc/src/__support/OSUtil/baremetal/exit.cpp (+4-2)
  • (modified) libc/src/__support/OSUtil/baremetal/io.cpp (+2-2)
  • (modified) libc/src/__support/OSUtil/baremetal/io.h (+2-2)
  • (modified) libc/src/__support/OSUtil/darwin/arm/syscall.h (+2-2)
  • (modified) libc/src/__support/OSUtil/darwin/io.h (+2-2)
  • (modified) libc/src/__support/OSUtil/darwin/syscall.h (+2-2)
  • (modified) libc/src/__support/OSUtil/exit.h (+2-1)
  • (modified) libc/src/__support/OSUtil/fcntl.h (+4-2)
  • (modified) libc/src/__support/OSUtil/fuchsia/io.h (+2-2)
  • (modified) libc/src/__support/OSUtil/gpu/exit.cpp (+4-2)
  • (modified) libc/src/__support/OSUtil/gpu/io.cpp (+2-2)
  • (modified) libc/src/__support/OSUtil/gpu/io.h (+2-2)
  • (modified) libc/src/__support/OSUtil/linux/aarch64/syscall.h (+2-2)
  • (modified) libc/src/__support/OSUtil/linux/arm/syscall.h (+2-2)
  • (modified) libc/src/__support/OSUtil/linux/exit.cpp (+4-2)
  • (modified) libc/src/__support/OSUtil/linux/fcntl.cpp (+4-2)
  • (modified) libc/src/__support/OSUtil/linux/io.h (+2-2)
  • (modified) libc/src/__support/OSUtil/linux/riscv/syscall.h (+2-2)
  • (modified) libc/src/__support/OSUtil/linux/syscall.h (+2-2)
  • (modified) libc/src/__support/OSUtil/linux/x86_64/syscall.h (+2-2)
  • (modified) libc/src/__support/RPC/rpc.h (+2-2)
  • (modified) libc/src/__support/RPC/rpc_client.cpp (+2-2)
  • (modified) libc/src/__support/RPC/rpc_client.h (+2-2)
  • (modified) libc/src/__support/RPC/rpc_util.h (+2-2)
  • (modified) libc/src/__support/StringUtil/error_to_string.cpp (+2-2)
  • (modified) libc/src/__support/StringUtil/error_to_string.h (+2-2)
  • (modified) libc/src/__support/StringUtil/message_mapper.h (+2-2)
  • (modified) libc/src/__support/StringUtil/signal_to_string.cpp (+2-2)
  • (modified) libc/src/__support/StringUtil/signal_to_string.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/linux_extension_errors.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/linux_extension_signals.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/linux_platform_errors.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/linux_platform_signals.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/minimal_platform_errors.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/minimal_platform_signals.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/posix_errors.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/posix_signals.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/signal_table.h (+4-2)
  • (modified) libc/src/__support/StringUtil/tables/stdc_errors.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/stdc_signals.h (+2-2)
  • (modified) libc/src/__support/arg_list.h (+2-2)
  • (modified) libc/src/__support/big_int.h (+2-2)
  • (modified) libc/src/__support/block.h (+2-2)
  • (modified) libc/src/__support/blockstore.h (+2-2)
  • (modified) libc/src/__support/c_string.h (+2-2)
  • (modified) libc/src/__support/char_vector.h (+2-2)
  • (modified) libc/src/__support/common.h (+3-2)
  • (modified) libc/src/__support/ctype_utils.h (+2-2)
  • (modified) libc/src/__support/detailed_powers_of_ten.h (+2-2)
  • (modified) libc/src/__support/endian.h (+2-2)
  • (modified) libc/src/__support/error_or.h (+2-2)
  • (modified) libc/src/__support/fixed_point/fx_bits.h (+4-2)
  • (modified) libc/src/__support/fixed_point/fx_rep.h (+4-2)
  • (modified) libc/src/__support/fixed_point/sqrt.h (+4-2)
  • (modified) libc/src/__support/fixedvector.h (+2-2)
  • (modified) libc/src/__support/float_to_string.h (+2-2)
  • (modified) libc/src/__support/freelist.h (+2-2)
  • (modified) libc/src/__support/freelist_heap.h (+2-2)
  • (modified) libc/src/__support/hash.h (+2-2)
  • (modified) libc/src/__support/high_precision_decimal.h (+2-2)
  • (modified) libc/src/__support/integer_literals.h (+2-2)
  • (modified) libc/src/__support/integer_operations.h (+2-2)
  • (modified) libc/src/__support/integer_to_string.h (+2-2)
  • (modified) libc/src/__support/intrusive_list.h (+2-2)
  • (modified) libc/src/__support/libc_assert.h (+2-2)
  • (modified) libc/src/__support/macros/optimization.h (+4-2)
  • (modified) libc/src/__support/math_extras.h (+2-2)
  • (modified) libc/src/__support/memory_size.h (+2-2)
  • (modified) libc/src/__support/number_pair.h (+2-2)
  • (modified) libc/src/__support/str_to_float.h (+2-2)
  • (modified) libc/src/__support/str_to_integer.h (+2-2)
  • (modified) libc/src/__support/str_to_num_result.h (+2-2)
  • (modified) libc/src/__support/threads/CndVar.h (+2-2)
  • (modified) libc/src/__support/threads/callonce.h (+2-2)
  • (modified) libc/src/__support/threads/fork_callbacks.cpp (+2-2)
  • (modified) libc/src/__support/threads/fork_callbacks.h (+2-2)
  • (modified) libc/src/__support/threads/gpu/mutex.h (+2-2)
  • (modified) libc/src/__support/threads/linux/CndVar.cpp (+2-2)
  • (modified) libc/src/__support/threads/linux/callonce.cpp (+2-2)
  • (modified) libc/src/__support/threads/linux/callonce.h (+2-2)
  • (modified) libc/src/__support/threads/linux/futex_utils.h (+2-2)
  • (modified) libc/src/__support/threads/linux/futex_word.h (+2-2)
  • (modified) libc/src/__support/threads/linux/mutex.h (+2-2)
  • (modified) libc/src/__support/threads/linux/raw_mutex.h (+2-2)
  • (modified) libc/src/__support/threads/linux/rwlock.h (+2-2)
  • (modified) libc/src/__support/threads/linux/thread.cpp (+2-2)
  • (modified) libc/src/__support/threads/mutex_common.h (+2-2)
  • (modified) libc/src/__support/threads/sleep.h (+2-2)
  • (modified) libc/src/__support/threads/thread.cpp (+2-2)
  • (modified) libc/src/__support/threads/thread.h (+2-2)
  • (modified) libc/src/__support/time/linux/abs_timeout.h (+2-2)
  • (modified) libc/src/__support/time/linux/clock_conversion.h (+2-2)
  • (modified) libc/src/__support/time/linux/clock_gettime.h (+2-2)
  • (modified) libc/src/__support/time/linux/monotonicity.h (+2-2)
  • (modified) libc/src/__support/time/units.h (+2-2)
  • (modified) libc/src/__support/wctype_utils.h (+2-2)
  • (modified) libc/src/assert/__assert_fail.h (+2-2)
  • (modified) libc/src/assert/generic/__assert_fail.cpp (+2-2)
  • (modified) libc/src/assert/gpu/__assert_fail.cpp (+2-2)
  • (modified) libc/src/ctype/isalnum.cpp (+2-2)
  • (modified) libc/src/ctype/isalnum.h (+2-2)
  • (modified) libc/src/ctype/isalpha.cpp (+2-2)
  • (modified) libc/src/ctype/isalpha.h (+2-2)
  • (modified) libc/src/ctype/isascii.cpp (+2-2)
  • (modified) libc/src/ctype/isascii.h (+2-2)
  • (modified) libc/src/ctype/isblank.cpp (+2-2)
  • (modified) libc/src/ctype/isblank.h (+2-2)
  • (modified) libc/src/ctype/iscntrl.cpp (+2-2)
  • (modified) libc/src/ctype/iscntrl.h (+2-2)
  • (modified) libc/src/ctype/isdigit.cpp (+2-2)
  • (modified) libc/src/ctype/isdigit.h (+2-2)
  • (modified) libc/src/ctype/isgraph.cpp (+2-2)
  • (modified) libc/src/ctype/isgraph.h (+2-2)
  • (modified) libc/src/ctype/islower.cpp (+2-2)
  • (modified) libc/src/ctype/islower.h (+2-2)
  • (modified) libc/src/ctype/isprint.cpp (+2-2)
  • (modified) libc/src/ctype/isprint.h (+2-2)
  • (modified) libc/src/ctype/ispunct.cpp (+2-2)
  • (modified) libc/src/ctype/ispunct.h (+2-2)
  • (modified) libc/src/ctype/isspace.cpp (+2-2)
  • (modified) libc/src/ctype/isspace.h (+2-2)
  • (modified) libc/src/ctype/isupper.cpp (+2-2)
  • (modified) libc/src/ctype/isupper.h (+2-2)
  • (modified) libc/src/ctype/isxdigit.cpp (+2-2)
  • (modified) libc/src/ctype/isxdigit.h (+2-2)
  • (modified) libc/src/ctype/toascii.cpp (+2-2)
  • (modified) libc/src/ctype/toascii.h (+2-2)
  • (modified) libc/src/ctype/tolower.cpp (+2-2)
  • (modified) libc/src/ctype/tolower.h (+2-2)
  • (modified) libc/src/ctype/toupper.cpp (+2-2)
  • (modified) libc/src/ctype/toupper.h (+2-2)
  • (modified) libc/src/dirent/closedir.cpp (+2-2)
  • (modified) libc/src/dirent/closedir.h (+2-2)
  • (modified) libc/src/dirent/dirfd.cpp (+2-2)
  • (modified) libc/src/dirent/dirfd.h (+2-2)
  • (modified) libc/src/dirent/opendir.cpp (+2-2)
  • (modified) libc/src/dirent/opendir.h (+2-2)
  • (modified) libc/src/dirent/readdir.cpp (+2-2)
  • (modified) libc/src/dirent/readdir.h (+2-2)
  • (modified) libc/src/dlfcn/dlclose.cpp (+2-2)
  • (modified) libc/src/dlfcn/dlclose.h (+2-2)
  • (modified) libc/src/dlfcn/dlerror.cpp (+2-2)
  • (modified) libc/src/dlfcn/dlerror.h (+2-2)
  • (modified) libc/src/dlfcn/dlopen.cpp (+2-2)
  • (modified) libc/src/dlfcn/dlopen.h (+2-2)
  • (modified) libc/src/dlfcn/dlsym.cpp (+2-2)
  • (modified) libc/src/dlfcn/dlsym.h (+2-2)
  • (modified) libc/src/errno/libc_errno.cpp (+2-2)
  • (modified) libc/src/errno/libc_errno.h (+2-2)
  • (modified) libc/src/fcntl/creat.h (+2-2)
  • (modified) libc/src/fcntl/fcntl.h (+2-2)
  • (modified) libc/src/fcntl/linux/creat.cpp (+2-2)
  • (modified) libc/src/fcntl/linux/fcntl.cpp (+2-2)
  • (modified) libc/src/fcntl/linux/open.cpp (+2-2)
  • (modified) libc/src/fcntl/linux/openat.cpp (+2-2)
  • (modified) libc/src/fcntl/open.h (+2-2)
  • (modified) libc/src/fcntl/openat.h (+2-2)
  • (modified) libc/src/fenv/feclearexcept.cpp (+2-2)
  • (modified) libc/src/fenv/feclearexcept.h (+2-2)
  • (modified) libc/src/fenv/fedisableexcept.cpp (+2-2)
  • (modified) libc/src/fenv/fedisableexcept.h (+2-2)
  • (modified) libc/src/fenv/feenableexcept.cpp (+2-2)
  • (modified) libc/src/fenv/feenableexcept.h (+2-2)
  • (modified) libc/src/fenv/fegetenv.cpp (+2-2)
  • (modified) libc/src/fenv/fegetenv.h (+2-2)
  • (modified) libc/src/fenv/fegetexcept.cpp (+2-2)
  • (modified) libc/src/fenv/fegetexcept.h (+2-2)
  • (modified) libc/src/fenv/fegetexceptflag.cpp (+2-2)
  • (modified) libc/src/fenv/fegetexceptflag.h (+2-2)
  • (modified) libc/src/fenv/fegetround.cpp (+2-2)
  • (modified) libc/src/fenv/fegetround.h (+2-2)
  • (modified) libc/src/fenv/feholdexcept.cpp (+2-2)
  • (modified) libc/src/fenv/feholdexcept.h (+2-2)
  • (modified) libc/src/fenv/feraiseexcept.cpp (+2-2)
  • (modified) libc/src/fenv/feraiseexcept.h (+2-2)
  • (modified) libc/src/fenv/fesetenv.cpp (+2-2)
  • (modified) libc/src/fenv/fesetenv.h (+2-2)
  • (modified) libc/src/fenv/fesetexcept.cpp (+2-2)
  • (modified) libc/src/fenv/fesetexcept.h (+2-2)
  • (modified) libc/src/fenv/fesetexceptflag.cpp (+2-2)
  • (modified) libc/src/fenv/fesetexceptflag.h (+2-2)
  • (modified) libc/src/fenv/fesetround.cpp (+2-2)
  • (modified) libc/src/fenv/fesetround.h (+2-2)
  • (modified) libc/src/fenv/fetestexcept.cpp (+2-2)
  • (modified) libc/src/fenv/fetestexcept.h (+2-2)
  • (modified) libc/src/fenv/fetestexceptflag.cpp (+2-2)
  • (modified) libc/src/fenv/fetestexceptflag.h (+2-2)
  • (modified) libc/src/fenv/feupdateenv.cpp (+2-2)
  • (modified) libc/src/fenv/feupdateenv.h (+2-2)
  • (modified) libc/src/gpu/rpc_fprintf.cpp (+2-2)
  • (modified) libc/src/gpu/rpc_fprintf.h (+2-2)
  • (modified) libc/src/gpu/rpc_host_call.cpp (+2-2)
  • (modified) libc/src/gpu/rpc_host_call.h (+2-2)
  • (modified) libc/src/inttypes/imaxabs.cpp (+2-2)
  • (modified) libc/src/inttypes/imaxabs.h (+2-2)
  • (modified) libc/src/inttypes/imaxdiv.cpp (+2-2)
  • (modified) libc/src/inttypes/imaxdiv.h (+2-2)
  • (modified) libc/src/inttypes/strtoimax.cpp (+2-2)
  • (modified) libc/src/inttypes/strtoimax.h (+2-2)
  • (modified) libc/src/inttypes/strtoumax.cpp (+2-2)
  • (modified) libc/src/inttypes/strtoumax.h (+2-2)
  • (modified) libc/src/math/aarch64/ceil.cpp (+2-2)
  • (modified) libc/src/math/aarch64/ceilf.cpp (+2-2)
  • (modified) libc/src/math/aarch64/floor.cpp (+2-2)
  • (modified) libc/src/math/aarch64/floorf.cpp (+2-2)
diff --git a/libc/benchmarks/LibcDefaultImplementations.cpp b/libc/benchmarks/LibcDefaultImplementations.cpp
index c50ae00ffa105..d19c4403329de 100644
--- a/libc/benchmarks/LibcDefaultImplementations.cpp
+++ b/libc/benchmarks/LibcDefaultImplementations.cpp
@@ -2,7 +2,7 @@
 #include "llvm/ADT/ArrayRef.h"
 #include <cstddef>
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 
 extern void *memcpy(void *__restrict, const void *__restrict, size_t);
 extern void *memmove(void *, const void *, size_t);
@@ -11,7 +11,7 @@ extern void bzero(void *, size_t);
 extern int memcmp(const void *, const void *, size_t);
 extern int bcmp(const void *, const void *, size_t);
 
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 // List of implementations to test.
 
diff --git a/libc/benchmarks/LibcMemoryBenchmarkMain.cpp b/libc/benchmarks/LibcMemoryBenchmarkMain.cpp
index bc6fd8b38cb6d..ab2d763a4f7a2 100644
--- a/libc/benchmarks/LibcMemoryBenchmarkMain.cpp
+++ b/libc/benchmarks/LibcMemoryBenchmarkMain.cpp
@@ -21,7 +21,7 @@
 #include <cstring>
 #include <unistd.h>
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 
 extern void *memcpy(void *__restrict, const void *__restrict, size_t);
 extern void *memmove(void *, const void *, size_t);
@@ -30,7 +30,7 @@ extern void bzero(void *, size_t);
 extern int memcmp(const void *, const void *, size_t);
 extern int bcmp(const void *, const void *, size_t);
 
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 namespace llvm {
 namespace libc_benchmarks {
diff --git a/libc/benchmarks/automemcpy/lib/CodeGen.cpp b/libc/benchmarks/automemcpy/lib/CodeGen.cpp
index 3837bd97d9f9a..1563c9be14ed2 100644
--- a/libc/benchmarks/automemcpy/lib/CodeGen.cpp
+++ b/libc/benchmarks/automemcpy/lib/CodeGen.cpp
@@ -542,11 +542,11 @@ static void Serialize(raw_ostream &Stream,
   Stream << "using llvm::libc_benchmarks::MemmoveConfiguration;\n";
   Stream << "using llvm::libc_benchmarks::MemsetConfiguration;\n";
   Stream << "\n";
-  Stream << "namespace LIBC_NAMESPACE {\n";
+  Stream << "namespace LIBC_NAMESPACE_DECL {\n";
   Stream << "\n";
   codegen::functions::Serialize(Stream, Descriptors);
   Stream << "\n";
-  Stream << "} // namespace LIBC_NAMESPACE\n";
+  Stream << "} // namespace LIBC_NAMESPACE_DECL\n";
   Stream << "\n";
   Stream << "namespace llvm {\n";
   Stream << "namespace automemcpy {\n";
diff --git a/libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp b/libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp
index 5084b1d67dcd5..77c094d893b48 100644
--- a/libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp
+++ b/libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp
@@ -63,7 +63,7 @@ using llvm::libc_benchmarks::MemcpyConfiguration;
 using llvm::libc_benchmarks::MemmoveConfiguration;
 using llvm::libc_benchmarks::MemsetConfiguration;
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 
 static void memcpy_0xE00E29EE73994E2B(char *__restrict dst, const char *__restrict src, size_t size) {
   using namespace LIBC_NAMESPACE::x86;
@@ -134,7 +134,7 @@ static void bzero_0x475977492C218AD4(char * dst, size_t size) {
   return splat_set<Align<_32,Arg::Dst>::Then<Loop<_32>>>(dst, 0, size);
 }
 
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 namespace llvm {
 namespace automemcpy {
diff --git a/libc/benchmarks/gpu/BenchmarkLogger.cpp b/libc/benchmarks/gpu/BenchmarkLogger.cpp
index 2e7e8e7600fdb..5c7608d6b662d 100644
--- a/libc/benchmarks/gpu/BenchmarkLogger.cpp
+++ b/libc/benchmarks/gpu/BenchmarkLogger.cpp
@@ -8,7 +8,7 @@
 
 #include <stdint.h>
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 namespace benchmarks {
 
 // cpp::string_view specialization
@@ -94,4 +94,4 @@ template BenchmarkLogger &BenchmarkLogger::operator<< <UInt<320>>(UInt<320>);
 BenchmarkLogger log;
 
 } // namespace benchmarks
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/benchmarks/gpu/BenchmarkLogger.h b/libc/benchmarks/gpu/BenchmarkLogger.h
index 332ff1439e6f5..5685c9dd65908 100644
--- a/libc/benchmarks/gpu/BenchmarkLogger.h
+++ b/libc/benchmarks/gpu/BenchmarkLogger.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_BENCHMARKS_GPU_BENCHMARKLOGGER_H
 #define LLVM_LIBC_BENCHMARKS_GPU_BENCHMARKLOGGER_H
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 namespace benchmarks {
 
 // A class to log to standard output in the context of hermetic tests.
@@ -22,6 +22,6 @@ struct BenchmarkLogger {
 extern BenchmarkLogger log;
 
 } // namespace benchmarks
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif /* LLVM_LIBC_BENCHMARKS_GPU_BENCHMARKLOGGER_H */
diff --git a/libc/benchmarks/gpu/LibcGpuBenchmark.cpp b/libc/benchmarks/gpu/LibcGpuBenchmark.cpp
index 7f60c9cc4a2f4..d66dc9c2266a0 100644
--- a/libc/benchmarks/gpu/LibcGpuBenchmark.cpp
+++ b/libc/benchmarks/gpu/LibcGpuBenchmark.cpp
@@ -7,7 +7,7 @@
 #include "src/__support/fixedvector.h"
 #include "src/time/gpu/time_utils.h"
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 namespace benchmarks {
 
 FixedVector<Benchmark *, 64> benchmarks;
@@ -136,4 +136,4 @@ BenchmarkResult benchmark(const BenchmarkOptions &options,
 };
 
 } // namespace benchmarks
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/benchmarks/gpu/LibcGpuBenchmark.h b/libc/benchmarks/gpu/LibcGpuBenchmark.h
index ffc858911b1c0..91a1c158beca3 100644
--- a/libc/benchmarks/gpu/LibcGpuBenchmark.h
+++ b/libc/benchmarks/gpu/LibcGpuBenchmark.h
@@ -10,7 +10,7 @@
 
 #include <stdint.h>
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 
 namespace benchmarks {
 
@@ -99,7 +99,7 @@ class Benchmark {
   const cpp::string_view get_name() const { return name; }
 };
 } // namespace benchmarks
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #define BENCHMARK(SuiteName, TestName, Func)                                   \
   LIBC_NAMESPACE::benchmarks::Benchmark SuiteName##_##TestName##_Instance(     \
diff --git a/libc/benchmarks/gpu/timing/nvptx/timing.h b/libc/benchmarks/gpu/timing/nvptx/timing.h
index d3851a764c43d..d141b08d4c922 100644
--- a/libc/benchmarks/gpu/timing/nvptx/timing.h
+++ b/libc/benchmarks/gpu/timing/nvptx/timing.h
@@ -16,7 +16,7 @@
 
 #include <stdint.h>
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 
 // Returns the overhead associated with calling the profiling region. This
 // allows us to substract the constant-time overhead from the latency to
@@ -94,6 +94,6 @@ static LIBC_INLINE uint64_t latency(F f, T1 t1, T2 t2) {
 
   return stop - start;
 }
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_UTILS_GPU_TIMING_NVPTX
diff --git a/libc/config/linux/app.h b/libc/config/linux/app.h
index 2a3b1560817b8..28bd010f1e6eb 100644
--- a/libc/config/linux/app.h
+++ b/libc/config/linux/app.h
@@ -13,7 +13,7 @@
 
 #include <stdint.h>
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 
 // Data structure to capture properties of the linux/ELF TLS image.
 struct TLSImage {
@@ -104,6 +104,6 @@ void cleanup_tls(uintptr_t tls_addr, uintptr_t tls_size);
 // Set the thread pointer for the current thread.
 bool set_thread_ptr(uintptr_t val);
 
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_CONFIG_LINUX_APP_H
diff --git a/libc/fuzzing/__support/hashtable_fuzz.cpp b/libc/fuzzing/__support/hashtable_fuzz.cpp
index 07f1057714114..8a6d7fd52fd36 100644
--- a/libc/fuzzing/__support/hashtable_fuzz.cpp
+++ b/libc/fuzzing/__support/hashtable_fuzz.cpp
@@ -13,7 +13,7 @@
 #include "src/__support/CPP/string_view.h"
 #include "src/__support/HashTable/table.h"
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 
 // A fuzzing payload starts with
 // - uint16_t: initial capacity for table A
@@ -179,4 +179,4 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   return 0;
 }
 
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/__support/CPP/algorithm.h b/libc/src/__support/CPP/algorithm.h
index 5120fa0daae17..6ca4ce06a0e26 100644
--- a/libc/src/__support/CPP/algorithm.h
+++ b/libc/src/__support/CPP/algorithm.h
@@ -14,7 +14,7 @@
 
 #include "src/__support/macros/attributes.h" // LIBC_INLINE
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 namespace cpp {
 
 template <class T> LIBC_INLINE constexpr const T &max(const T &a, const T &b) {
@@ -41,6 +41,6 @@ LIBC_INLINE constexpr bool all_of(InputIt first, InputIt last, UnaryPred p) {
 }
 
 } // namespace cpp
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_ALGORITHM_H
diff --git a/libc/src/__support/CPP/array.h b/libc/src/__support/CPP/array.h
index 4e69ba003e800..8cd5cc1133da2 100644
--- a/libc/src/__support/CPP/array.h
+++ b/libc/src/__support/CPP/array.h
@@ -13,7 +13,7 @@
 #include "src/__support/macros/attributes.h"
 #include <stddef.h> // For size_t.
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 namespace cpp {
 
 template <class T, size_t N> struct array {
@@ -74,6 +74,6 @@ template <class T, size_t N> struct array {
 };
 
 } // namespace cpp
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_ARRAY_H
diff --git a/libc/src/__support/CPP/atomic.h b/libc/src/__support/CPP/atomic.h
index e273d998c0702..70cff09a2c511 100644
--- a/libc/src/__support/CPP/atomic.h
+++ b/libc/src/__support/CPP/atomic.h
@@ -14,7 +14,7 @@
 
 #include "type_traits.h"
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 namespace cpp {
 
 enum class MemoryOrder : int {
@@ -211,6 +211,6 @@ LIBC_INLINE void atomic_signal_fence([[maybe_unused]] MemoryOrder mem_ord) {
 }
 
 } // namespace cpp
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_ATOMIC_H
diff --git a/libc/src/__support/CPP/bit.h b/libc/src/__support/CPP/bit.h
index 4aea066d26ab0..56e8db1967da7 100644
--- a/libc/src/__support/CPP/bit.h
+++ b/libc/src/__support/CPP/bit.h
@@ -18,7 +18,8 @@
 
 #include <stdint.h>
 
-namespace LIBC_NAMESPACE::cpp {
+namespace LIBC_NAMESPACE_DECL {
+namespace cpp {
 
 #if __has_builtin(__builtin_memcpy_inline)
 #define LLVM_LIBC_HAS_BUILTIN_MEMCPY_INLINE
@@ -290,6 +291,7 @@ ADD_SPECIALIZATION(unsigned long long, __builtin_popcountll)
 #endif // __builtin_popcountg
 #undef ADD_SPECIALIZATION
 
-} // namespace LIBC_NAMESPACE::cpp
+} // namespace cpp
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_BIT_H
diff --git a/libc/src/__support/CPP/bitset.h b/libc/src/__support/CPP/bitset.h
index 30a7fa796cb4b..a476c2f361127 100644
--- a/libc/src/__support/CPP/bitset.h
+++ b/libc/src/__support/CPP/bitset.h
@@ -12,7 +12,8 @@
 #include "src/__support/macros/attributes.h"
 #include <stddef.h> // For size_t.
 
-namespace LIBC_NAMESPACE::cpp {
+namespace LIBC_NAMESPACE_DECL {
+namespace cpp {
 
 template <size_t NumberOfBits> struct bitset {
   static_assert(NumberOfBits != 0,
@@ -86,6 +87,7 @@ template <size_t NumberOfBits> struct bitset {
   size_t Data[NUMBER_OF_UNITS] = {0};
 };
 
-} // namespace LIBC_NAMESPACE::cpp
+} // namespace cpp
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_BITSET_H
diff --git a/libc/src/__support/CPP/cstddef.h b/libc/src/__support/CPP/cstddef.h
index 1da51fd253fb5..2dd30a732f6e9 100644
--- a/libc/src/__support/CPP/cstddef.h
+++ b/libc/src/__support/CPP/cstddef.h
@@ -12,7 +12,8 @@
 #include "src/__support/macros/attributes.h"
 #include "type_traits.h" // For enable_if_t, is_integral_v.
 
-namespace LIBC_NAMESPACE::cpp {
+namespace LIBC_NAMESPACE_DECL {
+namespace cpp {
 
 enum class byte : unsigned char {};
 
@@ -66,6 +67,7 @@ to_integer(byte b) noexcept {
   return static_cast<IntegerType>(b);
 }
 
-} // namespace LIBC_NAMESPACE::cpp
+} // namespace cpp
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_CSTDDEF_H
diff --git a/libc/src/__support/CPP/expected.h b/libc/src/__support/CPP/expected.h
index c35f0a1dc5369..2c3cc67d44cc8 100644
--- a/libc/src/__support/CPP/expected.h
+++ b/libc/src/__support/CPP/expected.h
@@ -11,7 +11,8 @@
 
 #include "src/__support/macros/attributes.h"
 
-namespace LIBC_NAMESPACE::cpp {
+namespace LIBC_NAMESPACE_DECL {
+namespace cpp {
 
 // This is used to hold an unexpected value so that a different constructor is
 // selected.
@@ -52,6 +53,7 @@ template <class T, class E> class expected {
   LIBC_INLINE constexpr const T *operator->() const { return &exp; }
 };
 
-} // namespace LIBC_NAMESPACE::cpp
+} // namespace cpp
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_EXPECTED_H
diff --git a/libc/src/__support/CPP/functional.h b/libc/src/__support/CPP/functional.h
index 16283a264e657..1d03ed8c2bdb5 100644
--- a/libc/src/__support/CPP/functional.h
+++ b/libc/src/__support/CPP/functional.h
@@ -20,7 +20,7 @@
 
 #include <stdint.h>
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 namespace cpp {
 
 /// A function type adapted from LLVM's function_ref.
@@ -65,6 +65,6 @@ template <typename Ret, typename... Params> class function<Ret(Params...)> {
 };
 
 } // namespace cpp
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_FUNCTIONAL_H
diff --git a/libc/src/__support/CPP/iterator.h b/libc/src/__support/CPP/iterator.h
index b0fd5c9f22ae0..3488dc64d1559 100644
--- a/libc/src/__support/CPP/iterator.h
+++ b/libc/src/__support/CPP/iterator.h
@@ -14,7 +14,7 @@
 #include "src/__support/CPP/type_traits/is_same.h"
 #include "src/__support/macros/attributes.h"
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 namespace cpp {
 
 template <typename T> struct iterator_traits;
@@ -93,6 +93,6 @@ template <typename Iter> class reverse_iterator {
 };
 
 } // namespace cpp
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_ITERATOR_H
diff --git a/libc/src/__support/CPP/limits.h b/libc/src/__support/CPP/limits.h
index 5b9b3e755c72b..6b8c28770c781 100644
--- a/libc/src/__support/CPP/limits.h
+++ b/libc/src/__support/CPP/limits.h
@@ -15,7 +15,7 @@
 #include "src/__support/macros/attributes.h"       // LIBC_INLINE
 #include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT128
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 namespace cpp {
 
 namespace internal {
@@ -86,6 +86,6 @@ struct numeric_limits<__uint128_t>
 #endif
 
 } // namespace cpp
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_LIMITS_H
diff --git a/libc/src/__support/CPP/mutex.h b/libc/src/__support/CPP/mutex.h
index ff9c9f43a43cc..c6f02be50981b 100644
--- a/libc/src/__support/CPP/mutex.h
+++ b/libc/src/__support/CPP/mutex.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC___SUPPORT_CPP_MUTEX_H
 #define LLVM_LIBC_SRC___SUPPORT_CPP_MUTEX_H
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 namespace cpp {
 
 // Assume the calling thread has already obtained mutex ownership.
@@ -44,6 +44,6 @@ template <typename MutexType> class lock_guard {
 template <typename T> lock_guard(T &) -> lock_guard<T>;
 
 } // namespace cpp
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_MUTEX_H
diff --git a/libc/src/__support/CPP/new.h b/libc/src/__support/CPP/new.h
index 72187b70d7d24..024fe7e381501 100644
--- a/libc/src/__support/CPP/new.h
+++ b/libc/src/__support/CPP/new.h
@@ -23,7 +23,7 @@ enum class align_val_t : size_t {};
 
 } // namespace std
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 
 class AllocChecker {
   bool success = false;
@@ -52,7 +52,7 @@ class AllocChecker {
   }
 };
 
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 LIBC_INLINE void *operator new(size_t size,
                                LIBC_NAMESPACE::AllocChecker &ac) noexcept {
diff --git a/libc/src/__support/CPP/optional.h b/libc/src/__support/CPP/optional.h
index 2c0f639a2b342..f179425d24c1c 100644
--- a/libc/src/__support/CPP/optional.h
+++ b/libc/src/__support/CPP/optional.h
@@ -13,7 +13,7 @@
 #include "src/__support/CPP/utility.h"
 #include "src/__support/macros/attributes.h"
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 namespace cpp {
 
 // Trivial nullopt_t struct.
@@ -133,6 +133,6 @@ template <typename T> class optional {
 };
 
 } // namespace cpp
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_OPTIONAL_H
diff --git a/libc/src/__support/CPP/span.h b/libc/src/__support/CPP/span.h
index a8c1353581ba0..f1cedf1bc90a1 100644
--- a/libc/src/__support/CPP/span.h
+++ b/libc/src/__support/CPP/span.h
@@ -15,7 +15,8 @@
 
 #include "src/__support/macros/attributes.h"
 
-namespace LIBC_NAMESPACE::cpp {
+namespace LIBC_NAMESPACE_DECL {
+namespace cpp {
 
 // A trimmed down implementation of std::span.
 // Missing features:
@@ -119,6 +120,7 @@ template <typename T> class span {
   size_t span_size;
 };
 
-} // namespace LIBC_NAMESPACE::cpp
+} // namespace cpp
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_SPAN_H
diff --git a/libc/src/__support/CPP/string.h b/libc/src/__support/CPP/string.h
index cb794e081970d..2b7514b87d956 100644
--- a/libc/src/__support/CPP/string.h
+++ b/libc/src/__support/CPP/string.h
@@ -18,7 +18,7 @@
 #include <stddef.h> // size_t
 #include <stdlib.h> // malloc, free
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 namespace cpp {
 
 // This class mimics std::string but does not intend to be a full fledged
@@ -225,6 +225,6 @@ LIBC_INLINE string to_string(unsigned long long value) {
 // LIBC_INLINE string to_string(long double value);
 
 } // namespace cpp
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_STRING_H
diff --git a/libc/src/__support/CPP/string_view.h b/libc/src/__support/CPP/string_view.h
index 8aa96fa87f698..64d88b9e080d7 100644
--- a/libc/src/__support/CPP/string_view.h
+++ b/libc/src/__support/CPP/string_view.h
@@ -13,7 +13,7 @@
 
 #include <stddef.h>
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 namespace cpp {
 
 // This is very simple alternate of the std::string_view class. There is no
@@ -214,6 +214,6 @@ class string_view {
 };
 
 } // namespace cpp
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_STRING_VIEW_H
diff --git a/libc/src/__support/CPP/stringstream.h b/libc/src/__support/CPP/stringstream.h
index c8eb59cf65cbb..ff7f9c34cea40 100644
--- a/libc/src/__support/CPP/stringstream.h
+++ b/libc/src/__support/CPP/stringstream.h
@@ -15,7 +15,7 @@
 
 #include "src/__support/integer_to_string.h"
 
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
 namespace cpp {
 
 // This class is to be used to write simple strings into a user provided buffer
@@ -90,6 +90,6 @@ class StringStream {
 };
 
 } // namespace cpp
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_STRINGSTREAM_H
diff --git a/libc/src/__support/CPP/type_traits/add_lvalue_reference.h b/libc/src/__support/CPP/type_traits/add_lvalue_reference.h
index 2bca6267914d5..7a0e5ce8829ec 100644
--- a/libc/src/__support/CPP/type_traits/add_lvalue_reference.h
+++ b/libc/src/__support/CPP/type_traits/add_lvalue_reference.h
@@ -10,7 +10,8 @@
 
 #include "src/__support/CPP/type_traits/type_identity.h"
 
-namespace LIBC_NAMESPACE::cpp {
+namespace LIBC_NAMESPACE_DECL {
+namespace cpp {
 
 // add_lvalue_reference
 namespace detail {
@@ -25,6 +26,7 @@ struct add_lvalue_reference : decltype(detail::try_add_lvalue_reference<T>(0)) {
 template <class T>
 using add_lvalue_reference_t = typename add_lvalue_reference<T>::type;
 
-} // namespace LIBC_NAMESPACE::cpp
+} // namespace cpp
+} // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_TYPE_TRAITS_ADD_LVALUE_REFERENCE_H
diff --git a/libc/src/__support/CPP/type_traits/add_pointer.h b/libc/src/__support/CPP/type_traits/add_pointer.h
index 1257033ee80e2..bdd11d4df88f4 100644
--- a/libc/src/__support/CPP/type_traits/add_pointer.h
+++ b/libc/src/__support/CPP/type_traits/add_pointer.h
@@ -11,7 +11,8 @@
 #include "src/__support/CPP/type_t...
[truncated]

Copy link

github-actions bot commented Jul 8, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@jhuber6
Copy link
Contributor

jhuber6 commented Jul 8, 2024

So, this replaces every single namespace declaration with the following?

#define LIBC_NAMESPACE_DECL [[gnu::visibility("hidden")]] LIBC_NAMESPACE

Before that we need to identify all the entrypoints and make sure they retain default visibility. @frobtech suggested that we split that up into introducing a macro for exporting global variables, then we'd need to make sure that LIBC_FUNCTION_ATTRS includes default visibility.

However, that's if we want non-hidden visibility at all. The main effect of everything being hidden is that if someone does clang -shared foo.c -lc with our libc the symbols won't be visible from the shared library. Maybe that's the desired behavior? The GPU doesn't care because we have no shared libraries.

@petrhosek
Copy link
Member Author

So, this replaces every single namespace declaration with the following?

#define LIBC_NAMESPACE_DECL [[gnu::visibility("hidden")]] LIBC_NAMESPACE

Before that we need to identify all the entrypoints and make sure they retain default visibility. @frobtech suggested that we split that up into introducing a macro for exporting global variables, then we'd need to make sure that LIBC_FUNCTION_ATTRS includes default visibility.

However, that's if we want non-hidden visibility at all. The main effect of everything being hidden is that if someone does clang -shared foo.c -lc with our libc the symbols won't be visible from the shared library. Maybe that's the desired behavior? The GPU doesn't care because we have no shared libraries.

Correct, although it's currently incomplete. Specifically because LIBC_NAMESPACE_DECL is declared in libc/src/__support/macros/config.h, any file that uses it needs an additional #include. I'm trying to see if I can automate this using clang-include-fixer rather than doing this manually. Similarly, we also need need to update the CMake files to introduce the additional dependency which I don't yet have a solution for.

@jhuber6
Copy link
Contributor

jhuber6 commented Jul 8, 2024

So, this replaces every single namespace declaration with the following?

#define LIBC_NAMESPACE_DECL [[gnu::visibility("hidden")]] LIBC_NAMESPACE

Before that we need to identify all the entrypoints and make sure they retain default visibility. @frobtech suggested that we split that up into introducing a macro for exporting global variables, then we'd need to make sure that LIBC_FUNCTION_ATTRS includes default visibility.
However, that's if we want non-hidden visibility at all. The main effect of everything being hidden is that if someone does clang -shared foo.c -lc with our libc the symbols won't be visible from the shared library. Maybe that's the desired behavior? The GPU doesn't care because we have no shared libraries.

Correct, although it's currently incomplete. Specifically because LIBC_NAMESPACE_DECL is declared in libc/src/__support/macros/config.h, any file that uses it needs an additional #include. I'm trying to see if I can automate this using clang-include-fixer rather than doing this manually. Similarly, we also need need to update the CMake files to introduce the additional dependency which I don't yet have a solution for.

Alright, so this is basically the effect of compiling with -fvisibility=hidden by manually putting every single declaration into the namespace. Though we also need to fix the clang-tidy rule or else it will be really annoying.

@petrhosek
Copy link
Member Author

So, this replaces every single namespace declaration with the following?

#define LIBC_NAMESPACE_DECL [[gnu::visibility("hidden")]] LIBC_NAMESPACE

Before that we need to identify all the entrypoints and make sure they retain default visibility. @frobtech suggested that we split that up into introducing a macro for exporting global variables, then we'd need to make sure that LIBC_FUNCTION_ATTRS includes default visibility.
However, that's if we want non-hidden visibility at all. The main effect of everything being hidden is that if someone does clang -shared foo.c -lc with our libc the symbols won't be visible from the shared library. Maybe that's the desired behavior? The GPU doesn't care because we have no shared libraries.

Correct, although it's currently incomplete. Specifically because LIBC_NAMESPACE_DECL is declared in libc/src/__support/macros/config.h, any file that uses it needs an additional #include. I'm trying to see if I can automate this using clang-include-fixer rather than doing this manually. Similarly, we also need need to update the CMake files to introduce the additional dependency which I don't yet have a solution for.

Alright, so this is basically the effect of compiling with -fvisibility=hidden by manually putting every single declaration into the namespace. Though we also need to fix the clang-tidy rule or else it will be really annoying.

No, -fvisibility=hidden doesn't cover everything. The compiler semantics work in layers:

  1. -fvisibility=hidden means all definitions not affected by attributes, no effect on declarations.

  2. #pragma GCC visibility applies to all definitions and declarations after it (not widely used, but e.g. in Zircon we use that via a -include file to get everything without using other means).

  3. [[gnu::visibility(...)]] on namespace, class, struct, union applies to all definitions and declarations within that scope.

  4. [[gnu::visibility(...)]] on an individual declaration applies to that one declaration.

  5. [[gnu::visibility(...)]] on an individual definition overrides anything else prior..

That's why -fvisibility=hidden is not sufficient and in my testing even with -fvisibility=hidden as implemented in #98049 compiler still generates the unnecessary GOT relocs.

@jhuber6
Copy link
Contributor

jhuber6 commented Jul 8, 2024

I see, so external functions will be considered to have default visibility. I never noticed because in the LTO case they will just be resolved before even seeing the linker. I suppose this is because it's impossible to guess whether or not a global outside the TU.

@petrhosek
Copy link
Member Author

I used clang-include-cleaner to add the #includes although I think this may have been too eager and it'd be worthwhile running https://github.com/llvm/llvm-project/blob/d3cb277ea35d2cf25cdcc41b894959332477861c/clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp to remove the unnecessary ones.

@petrhosek petrhosek marked this pull request as ready for review July 9, 2024 06:36
@petrhosek petrhosek force-pushed the libc-namespace-decl branch 4 times, most recently from 3f45ab5 to cf5d87f Compare July 10, 2024 06:53
@llvmbot llvmbot added the bazel "Peripheral" support tier build system: utils/bazel label Jul 10, 2024
Copy link
Contributor

@michaelrj-google michaelrj-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@petrhosek petrhosek force-pushed the libc-namespace-decl branch 4 times, most recently from b4093aa to 0db71fb Compare July 11, 2024 18:59
@petrhosek petrhosek merged commit 3f30eff into llvm:main Jul 11, 2024
5 of 6 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 11, 2024

LLVM Buildbot has detected a new failure on builder libc-x86_64-debian-gcc-fullbuild-dbg running on libc-x86_64-debian-fullbuild while building libc,utils at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/131/builds/1907

Here is the relevant piece of the build log for the reference:

Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[260/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_init.dir/pthread_mutexattr_init.cpp.o
[261/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_gettype.dir/pthread_mutexattr_gettype.cpp.o
[262/500] Building CXX object projects/libc/src/string/CMakeFiles/libc.src.string.strlcpy.dir/strlcpy.cpp.o
[263/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_destroy.dir/pthread_mutexattr_destroy.cpp.o
[264/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_getrobust.dir/pthread_mutexattr_getrobust.cpp.o
[265/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_settype.dir/pthread_mutexattr_settype.cpp.o
[266/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_setrobust.dir/pthread_mutexattr_setrobust.cpp.o
[267/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_getpshared.dir/pthread_mutexattr_getpshared.cpp.o
[268/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_setpshared.dir/pthread_mutexattr_setpshared.cpp.o
[269/500] Building CXX object projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.strfromd.dir/strfromd.cpp.o
FAILED: projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.strfromd.dir/strfromd.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/src/stdlib -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/stdlib -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -ffreestanding -DLIBC_FULL_BUILD -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.strfromd.dir/strfromd.cpp.o -MF projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.strfromd.dir/strfromd.cpp.o.d -o projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.strfromd.dir/strfromd.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/stdlib/strfromd.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/uint128.h:12,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/str_to_integer.h:18,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/stdlib/str_from_util.h:22,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/stdlib/strfromd.cpp:11:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h: In instantiation of ‘constexpr __llvm_libc_19_0_0_git::cpp::array<word, N> __llvm_libc_19_0_0_git::multiword::shift(__llvm_libc_19_0_0_git::cpp::array<word, N>, size_t) [with Direction direction = __llvm_libc_19_0_0_git::multiword::RIGHT; bool is_signed = false; word = long unsigned int; long unsigned int N = 5; size_t = long unsigned int]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:760:61:   required from ‘constexpr __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType> __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>::operator>>(size_t) const [with long unsigned int Bits = 320; bool Signed = false; WordType = long unsigned int; size_t = long unsigned int]’
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:390:29:   required from here
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:281:28: error: ‘__llvm_libc_19_0_0_git::multiword::shift<__llvm_libc_19_0_0_git::multiword::RIGHT, false, long unsigned int, 5>(__llvm_libc_19_0_0_git::cpp::array<long unsigned int, 5>, size_t)::<lambda(size_t)>’ declared with greater visibility than the type of its field ‘__llvm_libc_19_0_0_git::multiword::shift<__llvm_libc_19_0_0_git::multiword::RIGHT, false, long unsigned int, 5>(__llvm_libc_19_0_0_git::cpp::array<long unsigned int, 5>, size_t)::<lambda(size_t)>::<array capture>’ [-Werror=attributes]
  281 |   const auto safe_get_at = [&](size_t index) -> word {
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  282 |     // return appropriate value when accessing out of bound elements.
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  283 |     const int i = at(index);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~
  284 |     if (i < 0)
      |     ~~~~~~~~~~              
  285 |       return 0;
      |       ~~~~~~~~~             
  286 |     if (i >= int(N))
      |     ~~~~~~~~~~~~~~~~        
  287 |       return is_neg ? -1 : 0;
      |       ~~~~~~~~~~~~~~~~~~~~~~~
  288 |     return array[i];
      |     ~~~~~~~~~~~~~~~~        
  289 |   };
      |   ~                         
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h: In instantiation of ‘constexpr __llvm_libc_19_0_0_git::cpp::array<word, N> __llvm_libc_19_0_0_git::multiword::shift(__llvm_libc_19_0_0_git::cpp::array<word, N>, size_t) [with Direction direction = __llvm_libc_19_0_0_git::multiword::LEFT; bool is_signed = false; word = long unsigned int; long unsigned int N = 258; size_t = long unsigned int]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:746:52:   required from ‘constexpr __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>& __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>::operator<<=(size_t) [with long unsigned int Bits = 16512; bool Signed = false; WordType = long unsigned int; size_t = long unsigned int]’
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:693:24:   required from here
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:281:28: error: ‘__llvm_libc_19_0_0_git::multiword::shift<__llvm_libc_19_0_0_git::multiword::LEFT, false, long unsigned int, 258>(__llvm_libc_19_0_0_git::cpp::array<long unsigned int, 258>, size_t)::<lambda(size_t)>’ declared with greater visibility than the type of its field ‘__llvm_libc_19_0_0_git::multiword::shift<__llvm_libc_19_0_0_git::multiword::LEFT, false, long unsigned int, 258>(__llvm_libc_19_0_0_git::cpp::array<long unsigned int, 258>, size_t)::<lambda(size_t)>::<array capture>’ [-Werror=attributes]
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h: In instantiation of ‘constexpr __llvm_libc_19_0_0_git::cpp::array<word, N> __llvm_libc_19_0_0_git::multiword::shift(__llvm_libc_19_0_0_git::cpp::array<word, N>, size_t) [with Direction direction = __llvm_libc_19_0_0_git::multiword::RIGHT; bool is_signed = false; word = long unsigned int; long unsigned int N = 258; size_t = long unsigned int]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:760:61:   required from ‘constexpr __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType> __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>::operator>>(size_t) const [with long unsigned int Bits = 16512; bool Signed = false; WordType = long unsigned int; size_t = long unsigned int]’
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:718:31:   required from here
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:281:28: error: ‘__llvm_libc_19_0_0_git::multiword::shift<__llvm_libc_19_0_0_git::multiword::RIGHT, false, long unsigned int, 258>(__llvm_libc_19_0_0_git::cpp::array<long unsigned int, 258>, size_t)::<lambda(size_t)>’ declared with greater visibility than the type of its field ‘__llvm_libc_19_0_0_git::multiword::shift<__llvm_libc_19_0_0_git::multiword::RIGHT, false, long unsigned int, 258>(__llvm_libc_19_0_0_git::cpp::array<long unsigned int, 258>, size_t)::<lambda(size_t)>::<array capture>’ [-Werror=attributes]
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h: In instantiation of ‘constexpr __llvm_libc_19_0_0_git::cpp::array<word, N> __llvm_libc_19_0_0_git::multiword::shift(__llvm_libc_19_0_0_git::cpp::array<word, N>, size_t) [with Direction direction = __llvm_libc_19_0_0_git::multiword::LEFT; bool is_signed = false; word = long unsigned int; long unsigned int N = 5; size_t = long unsigned int]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:746:52:   required from ‘constexpr __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>& __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>::operator<<=(size_t) [with long unsigned int Bits = 320; bool Signed = false; WordType = long unsigned int; size_t = long unsigned int]’
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:666:16:   required from ‘constexpr __llvm_libc_19_0_0_git::cpp::optional<__llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType> > __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>::div_uint_half_times_pow_2(__llvm_libc_19_0_0_git::multiword::half_width_t<WordType>, size_t) [with long unsigned int Bits = 320; bool Signed = false; WordType = long unsigned int; __llvm_libc_19_0_0_git::multiword::half_width_t<WordType> = unsigned int; size_t = long unsigned int]’
Step 6 (build libc) failure: build libc (failure)
...
[260/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_init.dir/pthread_mutexattr_init.cpp.o
[261/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_gettype.dir/pthread_mutexattr_gettype.cpp.o
[262/500] Building CXX object projects/libc/src/string/CMakeFiles/libc.src.string.strlcpy.dir/strlcpy.cpp.o
[263/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_destroy.dir/pthread_mutexattr_destroy.cpp.o
[264/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_getrobust.dir/pthread_mutexattr_getrobust.cpp.o
[265/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_settype.dir/pthread_mutexattr_settype.cpp.o
[266/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_setrobust.dir/pthread_mutexattr_setrobust.cpp.o
[267/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_getpshared.dir/pthread_mutexattr_getpshared.cpp.o
[268/500] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_mutexattr_setpshared.dir/pthread_mutexattr_setpshared.cpp.o
[269/500] Building CXX object projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.strfromd.dir/strfromd.cpp.o
FAILED: projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.strfromd.dir/strfromd.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/src/stdlib -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/stdlib -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -ffreestanding -DLIBC_FULL_BUILD -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.strfromd.dir/strfromd.cpp.o -MF projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.strfromd.dir/strfromd.cpp.o.d -o projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.strfromd.dir/strfromd.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/stdlib/strfromd.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/uint128.h:12,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/str_to_integer.h:18,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/stdlib/str_from_util.h:22,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/stdlib/strfromd.cpp:11:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h: In instantiation of ‘constexpr __llvm_libc_19_0_0_git::cpp::array<word, N> __llvm_libc_19_0_0_git::multiword::shift(__llvm_libc_19_0_0_git::cpp::array<word, N>, size_t) [with Direction direction = __llvm_libc_19_0_0_git::multiword::RIGHT; bool is_signed = false; word = long unsigned int; long unsigned int N = 5; size_t = long unsigned int]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:760:61:   required from ‘constexpr __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType> __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>::operator>>(size_t) const [with long unsigned int Bits = 320; bool Signed = false; WordType = long unsigned int; size_t = long unsigned int]’
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:390:29:   required from here
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:281:28: error: ‘__llvm_libc_19_0_0_git::multiword::shift<__llvm_libc_19_0_0_git::multiword::RIGHT, false, long unsigned int, 5>(__llvm_libc_19_0_0_git::cpp::array<long unsigned int, 5>, size_t)::<lambda(size_t)>’ declared with greater visibility than the type of its field ‘__llvm_libc_19_0_0_git::multiword::shift<__llvm_libc_19_0_0_git::multiword::RIGHT, false, long unsigned int, 5>(__llvm_libc_19_0_0_git::cpp::array<long unsigned int, 5>, size_t)::<lambda(size_t)>::<array capture>’ [-Werror=attributes]
  281 |   const auto safe_get_at = [&](size_t index) -> word {
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  282 |     // return appropriate value when accessing out of bound elements.
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  283 |     const int i = at(index);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~
  284 |     if (i < 0)
      |     ~~~~~~~~~~              
  285 |       return 0;
      |       ~~~~~~~~~             
  286 |     if (i >= int(N))
      |     ~~~~~~~~~~~~~~~~        
  287 |       return is_neg ? -1 : 0;
      |       ~~~~~~~~~~~~~~~~~~~~~~~
  288 |     return array[i];
      |     ~~~~~~~~~~~~~~~~        
  289 |   };
      |   ~                         
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h: In instantiation of ‘constexpr __llvm_libc_19_0_0_git::cpp::array<word, N> __llvm_libc_19_0_0_git::multiword::shift(__llvm_libc_19_0_0_git::cpp::array<word, N>, size_t) [with Direction direction = __llvm_libc_19_0_0_git::multiword::LEFT; bool is_signed = false; word = long unsigned int; long unsigned int N = 258; size_t = long unsigned int]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:746:52:   required from ‘constexpr __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>& __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>::operator<<=(size_t) [with long unsigned int Bits = 16512; bool Signed = false; WordType = long unsigned int; size_t = long unsigned int]’
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:693:24:   required from here
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:281:28: error: ‘__llvm_libc_19_0_0_git::multiword::shift<__llvm_libc_19_0_0_git::multiword::LEFT, false, long unsigned int, 258>(__llvm_libc_19_0_0_git::cpp::array<long unsigned int, 258>, size_t)::<lambda(size_t)>’ declared with greater visibility than the type of its field ‘__llvm_libc_19_0_0_git::multiword::shift<__llvm_libc_19_0_0_git::multiword::LEFT, false, long unsigned int, 258>(__llvm_libc_19_0_0_git::cpp::array<long unsigned int, 258>, size_t)::<lambda(size_t)>::<array capture>’ [-Werror=attributes]
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h: In instantiation of ‘constexpr __llvm_libc_19_0_0_git::cpp::array<word, N> __llvm_libc_19_0_0_git::multiword::shift(__llvm_libc_19_0_0_git::cpp::array<word, N>, size_t) [with Direction direction = __llvm_libc_19_0_0_git::multiword::RIGHT; bool is_signed = false; word = long unsigned int; long unsigned int N = 258; size_t = long unsigned int]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:760:61:   required from ‘constexpr __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType> __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>::operator>>(size_t) const [with long unsigned int Bits = 16512; bool Signed = false; WordType = long unsigned int; size_t = long unsigned int]’
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:718:31:   required from here
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:281:28: error: ‘__llvm_libc_19_0_0_git::multiword::shift<__llvm_libc_19_0_0_git::multiword::RIGHT, false, long unsigned int, 258>(__llvm_libc_19_0_0_git::cpp::array<long unsigned int, 258>, size_t)::<lambda(size_t)>’ declared with greater visibility than the type of its field ‘__llvm_libc_19_0_0_git::multiword::shift<__llvm_libc_19_0_0_git::multiword::RIGHT, false, long unsigned int, 258>(__llvm_libc_19_0_0_git::cpp::array<long unsigned int, 258>, size_t)::<lambda(size_t)>::<array capture>’ [-Werror=attributes]
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h: In instantiation of ‘constexpr __llvm_libc_19_0_0_git::cpp::array<word, N> __llvm_libc_19_0_0_git::multiword::shift(__llvm_libc_19_0_0_git::cpp::array<word, N>, size_t) [with Direction direction = __llvm_libc_19_0_0_git::multiword::LEFT; bool is_signed = false; word = long unsigned int; long unsigned int N = 5; size_t = long unsigned int]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:746:52:   required from ‘constexpr __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>& __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>::operator<<=(size_t) [with long unsigned int Bits = 320; bool Signed = false; WordType = long unsigned int; size_t = long unsigned int]’
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:666:16:   required from ‘constexpr __llvm_libc_19_0_0_git::cpp::optional<__llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType> > __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>::div_uint_half_times_pow_2(__llvm_libc_19_0_0_git::multiword::half_width_t<WordType>, size_t) [with long unsigned int Bits = 320; bool Signed = false; WordType = long unsigned int; __llvm_libc_19_0_0_git::multiword::half_width_t<WordType> = unsigned int; size_t = long unsigned int]’

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 11, 2024

LLVM Buildbot has detected a new failure on builder libc-aarch64-ubuntu-fullbuild-dbg running on libc-aarch64-ubuntu while building libc,utils at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/71/builds/1942

Here is the relevant piece of the build log for the reference:

Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[       OK ] LlvmLibcSupportLinuxTimeoutTest.OverflowNano (1 us)
[ RUN      ] LlvmLibcSupportLinuxTimeoutTest.UnderflowNano
[       OK ] LlvmLibcSupportLinuxTimeoutTest.UnderflowNano (1 us)
[ RUN      ] LlvmLibcSupportLinuxTimeoutTest.NoChangeIfClockIsMonotonic
[       OK ] LlvmLibcSupportLinuxTimeoutTest.NoChangeIfClockIsMonotonic (1 us)
[ RUN      ] LlvmLibcSupportLinuxTimeoutTest.ValidAfterConversion
[       OK ] LlvmLibcSupportLinuxTimeoutTest.ValidAfterConversion (2 us)
Ran 5 tests.  PASS: 5  FAIL: 0
[1098/2869] Linking CXX executable projects/libc/test/src/__support/CPP/libc.test.src.__support.CPP.type_traits_test.__unit__.__build__
[1099/2869] Linking CXX executable projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__
FAILED: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__ 
: && /usr/bin/clang++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g  projects/libc/test/src/__support/threads/linux/CMakeFiles/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__.dir/raw_mutex_test.cpp.o -o projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__  projects/libc/src/errno/CMakeFiles/libc.src.errno.errno.__internal__.dir/./libc_errno.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./exit.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./fcntl.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.mmap.__internal__.dir/./mmap.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.munmap.__internal__.dir/./munmap.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib._Exit.__internal__.dir/./_Exit.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o  projects/libc/src/__support/StringUtil/CMakeFiles/libc.src.__support.StringUtil.error_to_string.dir/./error_to_string.cpp.o  lib/libLibcDeathTestExecutors.unit.a  lib/libLibcTest.unit.a && :
/usr/bin/ld: projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o: in function `__llvm_libc_19_0_0_git::exit(int)':
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/stdlib/exit.cpp:19: undefined reference to `__cxa_finalize'
/usr/bin/ld: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__: hidden symbol `__cxa_finalize' isn't defined
/usr/bin/ld: final link failed: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[1100/2869] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isdigit_test.__unit__.__build__
[1101/2869] Running unit test libc.test.src.__support.CPP.type_traits_test.__unit__
[==========] Running 63 tests from 1 test suite.
[ RUN      ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Struct]
[       OK ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Struct] (3 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Union]
[       OK ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Union] (2 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Class]
[       OK ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Class] (2 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = float]
[       OK ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = float] (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = int]
[       OK ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = int] (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_lvalue_reference_void
[       OK ] LlvmLibcTypeTraitsTest.add_lvalue_reference_void (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = __llvm_libc_19_0_0_git::cpp::Struct]
[       OK ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = __llvm_libc_19_0_0_git::cpp::Struct] (2 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = __llvm_libc_19_0_0_git::cpp::Union]
[       OK ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = __llvm_libc_19_0_0_git::cpp::Union] (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = __llvm_libc_19_0_0_git::cpp::Class]
[       OK ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = __llvm_libc_19_0_0_git::cpp::Class] (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = float]
[       OK ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = float] (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = int]
[       OK ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = int] (2 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_pointer_void
[       OK ] LlvmLibcTypeTraitsTest.add_pointer_void (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_rvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Struct]
[       OK ] LlvmLibcTypeTraitsTest.add_rvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Struct] (2 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_rvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Union]
[       OK ] LlvmLibcTypeTraitsTest.add_rvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Union] (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_rvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Class]
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[       OK ] LlvmLibcSupportLinuxTimeoutTest.OverflowNano (1 us)
[ RUN      ] LlvmLibcSupportLinuxTimeoutTest.UnderflowNano
[       OK ] LlvmLibcSupportLinuxTimeoutTest.UnderflowNano (1 us)
[ RUN      ] LlvmLibcSupportLinuxTimeoutTest.NoChangeIfClockIsMonotonic
[       OK ] LlvmLibcSupportLinuxTimeoutTest.NoChangeIfClockIsMonotonic (1 us)
[ RUN      ] LlvmLibcSupportLinuxTimeoutTest.ValidAfterConversion
[       OK ] LlvmLibcSupportLinuxTimeoutTest.ValidAfterConversion (2 us)
Ran 5 tests.  PASS: 5  FAIL: 0
[1098/2869] Linking CXX executable projects/libc/test/src/__support/CPP/libc.test.src.__support.CPP.type_traits_test.__unit__.__build__
[1099/2869] Linking CXX executable projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__
FAILED: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__ 
: && /usr/bin/clang++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g  projects/libc/test/src/__support/threads/linux/CMakeFiles/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__.dir/raw_mutex_test.cpp.o -o projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__  projects/libc/src/errno/CMakeFiles/libc.src.errno.errno.__internal__.dir/./libc_errno.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./exit.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./fcntl.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.mmap.__internal__.dir/./mmap.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.munmap.__internal__.dir/./munmap.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib._Exit.__internal__.dir/./_Exit.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o  projects/libc/src/__support/StringUtil/CMakeFiles/libc.src.__support.StringUtil.error_to_string.dir/./error_to_string.cpp.o  lib/libLibcDeathTestExecutors.unit.a  lib/libLibcTest.unit.a && :
/usr/bin/ld: projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o: in function `__llvm_libc_19_0_0_git::exit(int)':
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/stdlib/exit.cpp:19: undefined reference to `__cxa_finalize'
/usr/bin/ld: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__: hidden symbol `__cxa_finalize' isn't defined
/usr/bin/ld: final link failed: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[1100/2869] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isdigit_test.__unit__.__build__
[1101/2869] Running unit test libc.test.src.__support.CPP.type_traits_test.__unit__
[==========] Running 63 tests from 1 test suite.
[ RUN      ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Struct]
[       OK ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Struct] (3 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Union]
[       OK ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Union] (2 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Class]
[       OK ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Class] (2 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = float]
[       OK ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = float] (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = int]
[       OK ] LlvmLibcTypeTraitsTest.add_lvalue_reference [ParamType = int] (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_lvalue_reference_void
[       OK ] LlvmLibcTypeTraitsTest.add_lvalue_reference_void (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = __llvm_libc_19_0_0_git::cpp::Struct]
[       OK ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = __llvm_libc_19_0_0_git::cpp::Struct] (2 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = __llvm_libc_19_0_0_git::cpp::Union]
[       OK ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = __llvm_libc_19_0_0_git::cpp::Union] (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = __llvm_libc_19_0_0_git::cpp::Class]
[       OK ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = __llvm_libc_19_0_0_git::cpp::Class] (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = float]
[       OK ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = float] (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = int]
[       OK ] LlvmLibcTypeTraitsTest.add_pointer [ParamType = int] (2 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_pointer_void
[       OK ] LlvmLibcTypeTraitsTest.add_pointer_void (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_rvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Struct]
[       OK ] LlvmLibcTypeTraitsTest.add_rvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Struct] (2 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_rvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Union]
[       OK ] LlvmLibcTypeTraitsTest.add_rvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Union] (1 us)
[ RUN      ] LlvmLibcTypeTraitsTest.add_rvalue_reference [ParamType = __llvm_libc_19_0_0_git::cpp::Class]

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 11, 2024

LLVM Buildbot has detected a new failure on builder libc-x86_64-debian-fullbuild-dbg running on libc-x86_64-debian-fullbuild while building libc,utils at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/179/builds/1905

Here is the relevant piece of the build log for the reference:

Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[       OK ] LlvmLibcHashTableBitMaskTest.Match (24 us)
[ RUN      ] LlvmLibcHashTableBitMaskTest.MaskAvailable
[       OK ] LlvmLibcHashTableBitMaskTest.MaskAvailable (15 us)
Ran 2 tests.  PASS: 2  FAIL: 0
[1379/3687] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isascii_test.__unit__.__build__
[1380/3687] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isalnum_test.__unit__.__build__
[1381/3687] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isblank_test.__unit__.__build__
[1382/3687] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.iscntrl_test.__unit__.__build__
[1383/3687] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isalpha_test.__unit__.__build__
[1384/3687] Linking CXX executable projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__
FAILED: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__ 
: && /usr/bin/clang++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g  projects/libc/test/src/__support/threads/linux/CMakeFiles/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__.dir/raw_mutex_test.cpp.o -o projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__  projects/libc/src/errno/CMakeFiles/libc.src.errno.errno.__internal__.dir/./libc_errno.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./exit.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./fcntl.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.mmap.__internal__.dir/./mmap.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.munmap.__internal__.dir/./munmap.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib._Exit.__internal__.dir/./_Exit.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o  projects/libc/src/__support/StringUtil/CMakeFiles/libc.src.__support.StringUtil.error_to_string.dir/./error_to_string.cpp.o  lib/libLibcDeathTestExecutors.unit.a  lib/libLibcTest.unit.a && :
/usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/12/crtbeginS.o: in function `__do_global_dtors_aux':
crtstuff.c:(.text+0x81): undefined reference to `__cxa_finalize'
/usr/bin/ld: crtstuff.c:(.text+0x93): undefined reference to `__cxa_finalize'
/usr/bin/ld: projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o: in function `__llvm_libc_19_0_0_git::exit(int)':
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/stdlib/exit.cpp:19: undefined reference to `__cxa_finalize'
/usr/bin/ld: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__: hidden symbol `__cxa_finalize' isn't defined
/usr/bin/ld: final link failed: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[1385/3687] Running unit test libc.test.src.ctype.isascii_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcIsAscii.DefaultLocale
[       OK ] LlvmLibcIsAscii.DefaultLocale (44 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[1386/3687] Running unit test libc.test.src.ctype.isalnum_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcIsAlNum.DefaultLocale
[       OK ] LlvmLibcIsAlNum.DefaultLocale (44 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[1387/3687] Running unit test libc.test.src.ctype.iscntrl_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcIsCntrl.DefaultLocale
[       OK ] LlvmLibcIsCntrl.DefaultLocale (43 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[1388/3687] Running unit test libc.test.src.ctype.isblank_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcIsBlank.DefaultLocale
[       OK ] LlvmLibcIsBlank.DefaultLocale (39 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[1389/3687] Running unit test libc.test.src.ctype.isalpha_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcIsAlpha.DefaultLocale
[       OK ] LlvmLibcIsAlpha.DefaultLocale (43 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[1390/3687] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isdigit_test.__unit__.__build__
[1391/3687] Linking CXX executable projects/libc/test/src/__support/CPP/libc.test.src.__support.CPP.type_traits_test.__unit__.__build__
[1392/3687] Building CXX object projects/libc/test/src/__support/FPUtil/CMakeFiles/libc.test.src.__support.FPUtil.fpbits_test.__unit__.__build__.dir/fpbits_test.cpp.o
[1393/3687] Building CXX object projects/libc/test/src/ctype/CMakeFiles/libc.test.src.ctype.isprint_test.__unit__.__build__.dir/isprint_test.cpp.o
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[       OK ] LlvmLibcHashTableBitMaskTest.Match (24 us)
[ RUN      ] LlvmLibcHashTableBitMaskTest.MaskAvailable
[       OK ] LlvmLibcHashTableBitMaskTest.MaskAvailable (15 us)
Ran 2 tests.  PASS: 2  FAIL: 0
[1379/3687] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isascii_test.__unit__.__build__
[1380/3687] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isalnum_test.__unit__.__build__
[1381/3687] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isblank_test.__unit__.__build__
[1382/3687] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.iscntrl_test.__unit__.__build__
[1383/3687] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isalpha_test.__unit__.__build__
[1384/3687] Linking CXX executable projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__
FAILED: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__ 
: && /usr/bin/clang++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g  projects/libc/test/src/__support/threads/linux/CMakeFiles/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__.dir/raw_mutex_test.cpp.o -o projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__  projects/libc/src/errno/CMakeFiles/libc.src.errno.errno.__internal__.dir/./libc_errno.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./exit.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./fcntl.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.mmap.__internal__.dir/./mmap.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.munmap.__internal__.dir/./munmap.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib._Exit.__internal__.dir/./_Exit.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o  projects/libc/src/__support/StringUtil/CMakeFiles/libc.src.__support.StringUtil.error_to_string.dir/./error_to_string.cpp.o  lib/libLibcDeathTestExecutors.unit.a  lib/libLibcTest.unit.a && :
/usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/12/crtbeginS.o: in function `__do_global_dtors_aux':
crtstuff.c:(.text+0x81): undefined reference to `__cxa_finalize'
/usr/bin/ld: crtstuff.c:(.text+0x93): undefined reference to `__cxa_finalize'
/usr/bin/ld: projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o: in function `__llvm_libc_19_0_0_git::exit(int)':
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/stdlib/exit.cpp:19: undefined reference to `__cxa_finalize'
/usr/bin/ld: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__: hidden symbol `__cxa_finalize' isn't defined
/usr/bin/ld: final link failed: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[1385/3687] Running unit test libc.test.src.ctype.isascii_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcIsAscii.DefaultLocale
[       OK ] LlvmLibcIsAscii.DefaultLocale (44 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[1386/3687] Running unit test libc.test.src.ctype.isalnum_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcIsAlNum.DefaultLocale
[       OK ] LlvmLibcIsAlNum.DefaultLocale (44 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[1387/3687] Running unit test libc.test.src.ctype.iscntrl_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcIsCntrl.DefaultLocale
[       OK ] LlvmLibcIsCntrl.DefaultLocale (43 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[1388/3687] Running unit test libc.test.src.ctype.isblank_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcIsBlank.DefaultLocale
[       OK ] LlvmLibcIsBlank.DefaultLocale (39 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[1389/3687] Running unit test libc.test.src.ctype.isalpha_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcIsAlpha.DefaultLocale
[       OK ] LlvmLibcIsAlpha.DefaultLocale (43 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[1390/3687] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isdigit_test.__unit__.__build__
[1391/3687] Linking CXX executable projects/libc/test/src/__support/CPP/libc.test.src.__support.CPP.type_traits_test.__unit__.__build__
[1392/3687] Building CXX object projects/libc/test/src/__support/FPUtil/CMakeFiles/libc.test.src.__support.FPUtil.fpbits_test.__unit__.__build__.dir/fpbits_test.cpp.o
[1393/3687] Building CXX object projects/libc/test/src/ctype/CMakeFiles/libc.test.src.ctype.isprint_test.__unit__.__build__.dir/isprint_test.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 11, 2024

LLVM Buildbot has detected a new failure on builder libc-x86_64-debian-fullbuild-dbg-asan running on libc-x86_64-debian-fullbuild while building libc,utils at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/171/builds/1888

Here is the relevant piece of the build log for the reference:

Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[       OK ] LlvmLibcFEnvImplTest.QuickRoundingTowardZeroTest (5 us)
[ RUN      ] LlvmLibcFEnvImplTest.QuickGetRoundTest
[       OK ] LlvmLibcFEnvImplTest.QuickGetRoundTest (5 us)
Ran 5 tests.  PASS: 5  FAIL: 0
[1409/3668] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.block_test.__unit__.__build__.dir/block_test.cpp.o
[1410/3668] Linking CXX executable projects/libc/test/src/__support/HashTable/libc.test.src.__support.HashTable.table_test.__unit__.__build__
[1411/3668] Linking CXX executable projects/libc/test/src/__support/HashTable/libc.test.src.__support.HashTable.table_test.__unit__.__NO_EXPLICIT_SIMD_OPT.__build__
[1412/3668] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.fdiml_test.__unit__.__build__.dir/fdiml_test.cpp.o
[1413/3668] Linking CXX executable projects/libc/test/src/__support/HashTable/libc.test.src.__support.HashTable.group_test.__unit__.__build__
[1414/3668] Linking CXX executable projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__
FAILED: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__ 
: && /usr/bin/clang++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -g  projects/libc/test/src/__support/threads/linux/CMakeFiles/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__.dir/raw_mutex_test.cpp.o -o projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__  projects/libc/src/errno/CMakeFiles/libc.src.errno.errno.__internal__.dir/./libc_errno.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./exit.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./fcntl.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.mmap.__internal__.dir/./mmap.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.munmap.__internal__.dir/./munmap.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib._Exit.__internal__.dir/./_Exit.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o  projects/libc/src/__support/StringUtil/CMakeFiles/libc.src.__support.StringUtil.error_to_string.dir/./error_to_string.cpp.o  lib/libLibcDeathTestExecutors.unit.a  lib/libLibcTest.unit.a && :
/usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/12/crtbeginS.o: in function `__do_global_dtors_aux':
crtstuff.c:(.text+0x81): undefined reference to `__cxa_finalize'
/usr/bin/ld: crtstuff.c:(.text+0x93): undefined reference to `__cxa_finalize'
/usr/bin/ld: projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o: in function `__llvm_libc_19_0_0_git::exit(int)':
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/stdlib/exit.cpp:19: undefined reference to `__cxa_finalize'
/usr/bin/ld: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__: hidden symbol `__cxa_finalize' isn't defined
/usr/bin/ld: final link failed: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[1415/3668] Running unit test libc.test.src.__support.HashTable.table_test.__unit__
[==========] Running 4 tests from 1 test suite.
[ RUN      ] LlvmLibcTableTest.AllocationAndDeallocation
[       OK ] LlvmLibcTableTest.AllocationAndDeallocation (3 ms)
[ RUN      ] LlvmLibcTableTest.Iteration
[       OK ] LlvmLibcTableTest.Iteration (881 us)
[ RUN      ] LlvmLibcTableTest.GrowthSequence
[       OK ] LlvmLibcTableTest.GrowthSequence (9 us)
[ RUN      ] LlvmLibcTableTest.Insertion
[       OK ] LlvmLibcTableTest.Insertion (120 us)
Ran 4 tests.  PASS: 4  FAIL: 0
[1416/3668] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isalpha_test.__unit__.__build__
[1417/3668] Linking CXX executable projects/libc/test/src/__support/HashTable/libc.test.src.__support.HashTable.group_test.__unit__.__NO_EXPLICIT_SIMD_OPT.__build__
[1418/3668] Running unit test libc.test.src.__support.HashTable.group_test.__unit__
[==========] Running 2 tests from 1 test suite.
[ RUN      ] LlvmLibcHashTableBitMaskTest.Match
[       OK ] LlvmLibcHashTableBitMaskTest.Match (12 us)
[ RUN      ] LlvmLibcHashTableBitMaskTest.MaskAvailable
[       OK ] LlvmLibcHashTableBitMaskTest.MaskAvailable (28 us)
Ran 2 tests.  PASS: 2  FAIL: 0
[1419/3668] Running unit test libc.test.src.__support.HashTable.table_test.__unit__.__NO_EXPLICIT_SIMD_OPT
[==========] Running 4 tests from 1 test suite.
[ RUN      ] LlvmLibcTableTest.AllocationAndDeallocation
[       OK ] LlvmLibcTableTest.AllocationAndDeallocation (2 ms)
[ RUN      ] LlvmLibcTableTest.Iteration
[       OK ] LlvmLibcTableTest.Iteration (841 us)
[ RUN      ] LlvmLibcTableTest.GrowthSequence
[       OK ] LlvmLibcTableTest.GrowthSequence (7 us)
[ RUN      ] LlvmLibcTableTest.Insertion
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[       OK ] LlvmLibcFEnvImplTest.QuickRoundingTowardZeroTest (5 us)
[ RUN      ] LlvmLibcFEnvImplTest.QuickGetRoundTest
[       OK ] LlvmLibcFEnvImplTest.QuickGetRoundTest (5 us)
Ran 5 tests.  PASS: 5  FAIL: 0
[1409/3668] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.block_test.__unit__.__build__.dir/block_test.cpp.o
[1410/3668] Linking CXX executable projects/libc/test/src/__support/HashTable/libc.test.src.__support.HashTable.table_test.__unit__.__build__
[1411/3668] Linking CXX executable projects/libc/test/src/__support/HashTable/libc.test.src.__support.HashTable.table_test.__unit__.__NO_EXPLICIT_SIMD_OPT.__build__
[1412/3668] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.fdiml_test.__unit__.__build__.dir/fdiml_test.cpp.o
[1413/3668] Linking CXX executable projects/libc/test/src/__support/HashTable/libc.test.src.__support.HashTable.group_test.__unit__.__build__
[1414/3668] Linking CXX executable projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__
FAILED: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__ 
: && /usr/bin/clang++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -g  projects/libc/test/src/__support/threads/linux/CMakeFiles/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__.dir/raw_mutex_test.cpp.o -o projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__  projects/libc/src/errno/CMakeFiles/libc.src.errno.errno.__internal__.dir/./libc_errno.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./exit.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./fcntl.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.mmap.__internal__.dir/./mmap.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.munmap.__internal__.dir/./munmap.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib._Exit.__internal__.dir/./_Exit.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o  projects/libc/src/__support/StringUtil/CMakeFiles/libc.src.__support.StringUtil.error_to_string.dir/./error_to_string.cpp.o  lib/libLibcDeathTestExecutors.unit.a  lib/libLibcTest.unit.a && :
/usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/12/crtbeginS.o: in function `__do_global_dtors_aux':
crtstuff.c:(.text+0x81): undefined reference to `__cxa_finalize'
/usr/bin/ld: crtstuff.c:(.text+0x93): undefined reference to `__cxa_finalize'
/usr/bin/ld: projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o: in function `__llvm_libc_19_0_0_git::exit(int)':
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/stdlib/exit.cpp:19: undefined reference to `__cxa_finalize'
/usr/bin/ld: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__: hidden symbol `__cxa_finalize' isn't defined
/usr/bin/ld: final link failed: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[1415/3668] Running unit test libc.test.src.__support.HashTable.table_test.__unit__
[==========] Running 4 tests from 1 test suite.
[ RUN      ] LlvmLibcTableTest.AllocationAndDeallocation
[       OK ] LlvmLibcTableTest.AllocationAndDeallocation (3 ms)
[ RUN      ] LlvmLibcTableTest.Iteration
[       OK ] LlvmLibcTableTest.Iteration (881 us)
[ RUN      ] LlvmLibcTableTest.GrowthSequence
[       OK ] LlvmLibcTableTest.GrowthSequence (9 us)
[ RUN      ] LlvmLibcTableTest.Insertion
[       OK ] LlvmLibcTableTest.Insertion (120 us)
Ran 4 tests.  PASS: 4  FAIL: 0
[1416/3668] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isalpha_test.__unit__.__build__
[1417/3668] Linking CXX executable projects/libc/test/src/__support/HashTable/libc.test.src.__support.HashTable.group_test.__unit__.__NO_EXPLICIT_SIMD_OPT.__build__
[1418/3668] Running unit test libc.test.src.__support.HashTable.group_test.__unit__
[==========] Running 2 tests from 1 test suite.
[ RUN      ] LlvmLibcHashTableBitMaskTest.Match
[       OK ] LlvmLibcHashTableBitMaskTest.Match (12 us)
[ RUN      ] LlvmLibcHashTableBitMaskTest.MaskAvailable
[       OK ] LlvmLibcHashTableBitMaskTest.MaskAvailable (28 us)
Ran 2 tests.  PASS: 2  FAIL: 0
[1419/3668] Running unit test libc.test.src.__support.HashTable.table_test.__unit__.__NO_EXPLICIT_SIMD_OPT
[==========] Running 4 tests from 1 test suite.
[ RUN      ] LlvmLibcTableTest.AllocationAndDeallocation
[       OK ] LlvmLibcTableTest.AllocationAndDeallocation (2 ms)
[ RUN      ] LlvmLibcTableTest.Iteration
[       OK ] LlvmLibcTableTest.Iteration (841 us)
[ RUN      ] LlvmLibcTableTest.GrowthSequence
[       OK ] LlvmLibcTableTest.GrowthSequence (7 us)
[ RUN      ] LlvmLibcTableTest.Insertion

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 11, 2024

LLVM Buildbot has detected a new failure on builder premerge-monolithic-linux running on premerge-linux-1 while building libc,utils at step 6 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/2695

Here is the relevant piece of the build log for the reference:

Step 6 (build-unified-tree) failure: build (failure)
...
6.581 [615/58/723] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_stoptheworld_mac.cpp.o
6.587 [614/58/724] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_stoptheworld_win.cpp.o
6.641 [613/58/725] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_flag_parser.cpp.o
6.649 [612/58/726] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_type_traits.cpp.o
6.649 [611/58/727] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_win.cpp.o
6.650 [610/58/728] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_platform_limits_posix.cpp.o
6.651 [609/58/729] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_procmaps_linux.cpp.o
6.652 [608/58/730] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoLibc.x86_64.dir/sanitizer_common_nolibc.cpp.o
6.652 [607/58/731] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_allocator_checks.cpp.o
6.653 [606/58/732] Building CXX object libc/test/src/math/performance_testing/CMakeFiles/libc_diff_test_utils.dir/Timer.cpp.o
FAILED: libc/test/src/math/performance_testing/CMakeFiles/libc_diff_test_utils.dir/Timer.cpp.o 
/build/buildbot/premerge-monolithic-linux/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git  -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -UNDEBUG -std=gnu++17 -MD -MT libc/test/src/math/performance_testing/CMakeFiles/libc_diff_test_utils.dir/Timer.cpp.o -MF libc/test/src/math/performance_testing/CMakeFiles/libc_diff_test_utils.dir/Timer.cpp.o.d -o libc/test/src/math/performance_testing/CMakeFiles/libc_diff_test_utils.dir/Timer.cpp.o -c /build/buildbot/premerge-monolithic-linux/llvm-project/libc/test/src/math/performance_testing/Timer.cpp
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/libc/test/src/math/performance_testing/Timer.cpp:9:
/build/buildbot/premerge-monolithic-linux/llvm-project/libc/test/src/math/performance_testing/Timer.h:12:10: fatal error: 'src/__support/macros/config.h' file not found
   12 | #include "src/__support/macros/config.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
6.653 [606/57/733] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_flags.cpp.o
6.653 [606/56/734] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_libignore.cpp.o
6.653 [606/55/735] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_dl.cpp.o
6.653 [606/54/736] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_mac_libcdep.cpp.o
6.653 [606/53/737] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_netbsd_libcdep.cpp.o
6.717 [606/52/738] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_suppressions.cpp.o
6.750 [606/51/739] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_posix.cpp.o
6.751 [606/50/740] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_printf.cpp.o
6.751 [606/49/741] Building CXX object libc/test/UnitTest/CMakeFiles/LibcFPTestHelpers.unit.dir/RoundingModeUtils.cpp.o
6.751 [606/48/742] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_libc.cpp.o
6.752 [606/47/743] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_thread_arg_retval.cpp.o
6.752 [606/46/744] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_range.cpp.o
6.752 [606/45/745] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_tls_get_addr.cpp.o
6.752 [606/44/746] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonCoverage.x86_64.dir/sancov_flags.cpp.o
6.757 [606/43/747] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonCoverage.x86_64.dir/sanitizer_coverage_fuchsia.cpp.o
6.757 [606/42/748] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_printf.cpp.o
6.816 [606/41/749] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_posix.cpp.o
6.817 [606/40/750] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_linux.cpp.o
6.817 [606/39/751] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_common.cpp.o
6.817 [606/38/752] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_platform_limits_posix.cpp.o
6.818 [606/37/753] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_procmaps_common.cpp.o
6.818 [606/36/754] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonCoverage.x86_64.dir/sanitizer_coverage_win_sections.cpp.o
6.822 [606/35/755] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_deadlock_detector1.cpp.o
6.840 [606/34/756] Building CXX object libc/src/stdio/scanf_core/CMakeFiles/libc.src.stdio.scanf_core.converter.dir/float_converter.cpp.o
6.840 [606/33/757] Building CXX object libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.shm_unlink.dir/shm_unlink.cpp.o
6.840 [606/32/758] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_allocator.cpp.o
6.840 [606/31/759] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_suppressions.cpp.o
6.841 [606/30/760] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_common_libcdep.cpp.o
6.845 [606/29/761] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_libc.cpp.o
6.845 [606/28/762] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_posix_libcdep.cpp.o
6.851 [606/27/763] Building CXX object libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.shm_open.dir/shm_open.cpp.o
6.852 [606/26/764] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_chained_origin_depot.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 11, 2024

LLVM Buildbot has detected a new failure on builder libc-riscv64-debian-fullbuild-dbg running on libc-riscv64-debian while building libc,utils at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/183/builds/1231

Here is the relevant piece of the build log for the reference:

Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[       OK ] LlvmLibcUIntClassTest.BasicArithmeticInt128Tests (26 us)
[ RUN      ] LlvmLibcUIntClassTest.ConstructorFromUInt128Tests
[       OK ] LlvmLibcUIntClassTest.ConstructorFromUInt128Tests (16 us)
[ RUN      ] LlvmLibcUIntClassTest.WordTypeUInt128Tests
[       OK ] LlvmLibcUIntClassTest.WordTypeUInt128Tests (521 us)
[ RUN      ] LlvmLibcUIntClassTest.OtherWordTypeTests
[       OK ] LlvmLibcUIntClassTest.OtherWordTypeTests (11 us)
Ran 85 tests.  PASS: 85  FAIL: 0
[1155/3137] Building CXX object projects/libc/test/src/ctype/CMakeFiles/libc.test.src.ctype.isascii_test.__unit__.__build__.dir/isascii_test.cpp.o
[1156/3137] Linking CXX executable projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__
FAILED: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__ 
: && /usr/bin/clang++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g  projects/libc/test/src/__support/threads/linux/CMakeFiles/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__.dir/raw_mutex_test.cpp.o -o projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__  projects/libc/src/errno/CMakeFiles/libc.src.errno.errno.__internal__.dir/./libc_errno.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./exit.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./fcntl.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.mmap.__internal__.dir/./mmap.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.munmap.__internal__.dir/./munmap.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib._Exit.__internal__.dir/./_Exit.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o  projects/libc/src/__support/StringUtil/CMakeFiles/libc.src.__support.StringUtil.error_to_string.dir/./error_to_string.cpp.o  lib/libLibcDeathTestExecutors.unit.a  lib/libLibcTest.unit.a && :
/usr/bin/ld: projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o: in function `__llvm_libc_18_0_0_git::exit(int)':
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdlib/exit.cpp:18: undefined reference to `__cxa_finalize'
/usr/bin/ld: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__: hidden symbol `__cxa_finalize' isn't defined
/usr/bin/ld: final link failed: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[1157/3137] Building CXX object projects/libc/test/src/ctype/CMakeFiles/libc.test.src.ctype.isblank_test.__unit__.__build__.dir/isblank_test.cpp.o
[1158/3137] Building CXX object projects/libc/test/src/ctype/CMakeFiles/libc.test.src.ctype.iscntrl_test.__unit__.__build__.dir/iscntrl_test.cpp.o
[1159/3137] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isalpha_test.__unit__.__build__
[1160/3137] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isascii_test.__unit__.__build__
[1161/3137] Running unit test libc.test.src.__support.hash_test.__unit__
[==========] Running 4 tests from 1 test suite.
[ RUN      ] LlvmLibcHashTest.SanityCheck
[       OK ] LlvmLibcHashTest.SanityCheck (45 ms)
[ RUN      ] LlvmLibcHashTest.Avalanche
[       OK ] LlvmLibcHashTest.Avalanche (23418 ms)
[ RUN      ] LlvmLibcHashTest.UniformLSB
[       OK ] LlvmLibcHashTest.UniformLSB (2144 ms)
[ RUN      ] LlvmLibcHashTest.UniformMSB
[       OK ] LlvmLibcHashTest.UniformMSB (12 ms)
Ran 4 tests.  PASS: 4  FAIL: 0
ninja: build stopped: subcommand failed.
['ninja', 'libc-unit-tests'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 164, in step
    yield
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 132, in main
    run_command(['ninja', 'libc-unit-tests'])
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 179, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', 'libc-unit-tests']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
@@@BUILD_STEP libc-api-test@@@
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[       OK ] LlvmLibcUIntClassTest.BasicArithmeticInt128Tests (26 us)
[ RUN      ] LlvmLibcUIntClassTest.ConstructorFromUInt128Tests
[       OK ] LlvmLibcUIntClassTest.ConstructorFromUInt128Tests (16 us)
[ RUN      ] LlvmLibcUIntClassTest.WordTypeUInt128Tests
[       OK ] LlvmLibcUIntClassTest.WordTypeUInt128Tests (521 us)
[ RUN      ] LlvmLibcUIntClassTest.OtherWordTypeTests
[       OK ] LlvmLibcUIntClassTest.OtherWordTypeTests (11 us)
Ran 85 tests.  PASS: 85  FAIL: 0
[1155/3137] Building CXX object projects/libc/test/src/ctype/CMakeFiles/libc.test.src.ctype.isascii_test.__unit__.__build__.dir/isascii_test.cpp.o
[1156/3137] Linking CXX executable projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__
FAILED: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__ 
: && /usr/bin/clang++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g  projects/libc/test/src/__support/threads/linux/CMakeFiles/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__.dir/raw_mutex_test.cpp.o -o projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__  projects/libc/src/errno/CMakeFiles/libc.src.errno.errno.__internal__.dir/./libc_errno.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./exit.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./fcntl.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.mmap.__internal__.dir/./mmap.cpp.o  projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.munmap.__internal__.dir/./munmap.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib._Exit.__internal__.dir/./_Exit.cpp.o  projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o  projects/libc/src/__support/StringUtil/CMakeFiles/libc.src.__support.StringUtil.error_to_string.dir/./error_to_string.cpp.o  lib/libLibcDeathTestExecutors.unit.a  lib/libLibcTest.unit.a && :
/usr/bin/ld: projects/libc/src/stdlib/CMakeFiles/libc.src.stdlib.exit.__internal__.dir/./exit.cpp.o: in function `__llvm_libc_18_0_0_git::exit(int)':
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdlib/exit.cpp:18: undefined reference to `__cxa_finalize'
/usr/bin/ld: projects/libc/test/src/__support/threads/linux/libc.test.src.__support.threads.linux.raw_mutex_test.__unit__.__build__: hidden symbol `__cxa_finalize' isn't defined
/usr/bin/ld: final link failed: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[1157/3137] Building CXX object projects/libc/test/src/ctype/CMakeFiles/libc.test.src.ctype.isblank_test.__unit__.__build__.dir/isblank_test.cpp.o
[1158/3137] Building CXX object projects/libc/test/src/ctype/CMakeFiles/libc.test.src.ctype.iscntrl_test.__unit__.__build__.dir/iscntrl_test.cpp.o
[1159/3137] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isalpha_test.__unit__.__build__
[1160/3137] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isascii_test.__unit__.__build__
[1161/3137] Running unit test libc.test.src.__support.hash_test.__unit__
[==========] Running 4 tests from 1 test suite.
[ RUN      ] LlvmLibcHashTest.SanityCheck
[       OK ] LlvmLibcHashTest.SanityCheck (45 ms)
[ RUN      ] LlvmLibcHashTest.Avalanche
[       OK ] LlvmLibcHashTest.Avalanche (23418 ms)
[ RUN      ] LlvmLibcHashTest.UniformLSB
[       OK ] LlvmLibcHashTest.UniformLSB (2144 ms)
[ RUN      ] LlvmLibcHashTest.UniformMSB
[       OK ] LlvmLibcHashTest.UniformMSB (12 ms)
Ran 4 tests.  PASS: 4  FAIL: 0
ninja: build stopped: subcommand failed.
['ninja', 'libc-unit-tests'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 164, in step
    yield
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 132, in main
    run_command(['ninja', 'libc-unit-tests'])
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 179, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', 'libc-unit-tests']' returned non-zero exit status 1.

@joker-eph
Copy link
Collaborator

Bots are still broken right now, I’ll revert for now.

@petrhosek
Copy link
Member Author

Bots are still broken right now, I’ll revert for now.

Do you have a link to the broken bots? I wasn't aware of any further issues.

@petrhosek petrhosek deleted the libc-namespace-decl branch July 12, 2024 07:27
@joker-eph
Copy link
Collaborator

You can navigate the links in the comments posted above, the failure that got me here was: https://lab.llvm.org/buildbot/#/builders/153/builds/2695

aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AMDGPU bazel "Peripheral" support tier build system: utils/bazel libc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants