Skip to content

Commit e3188a0

Browse files
authored
Update LLVM libraries to 20.1.8 (#24757)
1 parent 37e16e0 commit e3188a0

14 files changed

+33
-31
lines changed

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ See docs/process.md for more on how version tagging works.
2020

2121
4.0.12 (in development)
2222
-----------------------
23+
- libcxx, libcxxabi, libunwind, and compiler-rt were updated to LLVM 20.1.8.
24+
(#24757)
2325
- The `fsblkcnt_t` and `fsfilcnt_t` types used by `statfs`/`statvfs` were
2426
changed from 32-bit to 64-bit. (#24769)
2527
- Support for `-sTEXT_DECODER=0` was removed, due to widespread support for

system/lib/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -338,17 +338,9 @@ static void ioctl_table_fill() {
338338
_(SOUND_PCM_WRITE_CHANNELS, WRITE, sizeof(int));
339339
_(SOUND_PCM_WRITE_FILTER, WRITE, sizeof(int));
340340
_(TCFLSH, NONE, 0);
341-
#if SANITIZER_GLIBC
342-
_(TCGETA, WRITE, struct_termio_sz);
343-
#endif
344341
_(TCGETS, WRITE, struct_termios_sz);
345342
_(TCSBRK, NONE, 0);
346343
_(TCSBRKP, NONE, 0);
347-
#if SANITIZER_GLIBC
348-
_(TCSETA, READ, struct_termio_sz);
349-
_(TCSETAF, READ, struct_termio_sz);
350-
_(TCSETAW, READ, struct_termio_sz);
351-
#endif
352344
_(TCSETS, READ, struct_termios_sz);
353345
_(TCSETSF, READ, struct_termios_sz);
354346
_(TCSETSW, READ, struct_termios_sz);

system/lib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@
8686
# include <sys/sysmacros.h>
8787
# endif
8888

89+
# if SANITIZER_LINUX && defined(__powerpc64__)
90+
# include <asm/ptrace.h>
91+
# endif
92+
8993
# if SANITIZER_FREEBSD
9094
# include <machine/atomic.h>
9195
# include <sys/exec.h>

system/lib/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -619,21 +619,22 @@ static void GetTls(uptr *addr, uptr *size) {
619619
*addr = tp - RoundUpTo(*size, align);
620620
*size = tp - *addr + ThreadDescriptorSize();
621621
# else
622-
if (SANITIZER_GLIBC)
623-
*size += 1664;
624-
else if (SANITIZER_FREEBSD)
625-
*size += 128; // RTLD_STATIC_TLS_EXTRA
626-
# if defined(__mips__) || defined(__powerpc64__) || SANITIZER_RISCV64
622+
# if SANITIZER_GLIBC
623+
*size += 1664;
624+
# elif SANITIZER_FREEBSD
625+
*size += 128; // RTLD_STATIC_TLS_EXTRA
626+
# if defined(__mips__) || defined(__powerpc64__) || SANITIZER_RISCV64
627627
const uptr pre_tcb_size = TlsPreTcbSize();
628628
*addr -= pre_tcb_size;
629629
*size += pre_tcb_size;
630-
# else
630+
# else
631631
// arm and aarch64 reserve two words at TP, so this underestimates the range.
632632
// However, this is sufficient for the purpose of finding the pointers to
633633
// thread-specific data keys.
634634
const uptr tcb_size = ThreadDescriptorSize();
635635
*addr -= tcb_size;
636636
*size += tcb_size;
637+
# endif
637638
# endif
638639
# endif
639640
# elif SANITIZER_NETBSD

system/lib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
# include <sys/ptrace.h>
9797
# if defined(__mips64) || defined(__aarch64__) || defined(__arm__) || \
9898
defined(__hexagon__) || defined(__loongarch__) || SANITIZER_RISCV64 || \
99-
defined(__sparc__)
99+
defined(__sparc__) || defined(__powerpc64__)
100100
# include <asm/ptrace.h>
101101
# ifdef __arm__
102102
typedef struct user_fpregs elf_fpregset_t;
@@ -488,9 +488,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
488488
unsigned struct_input_id_sz = sizeof(struct input_id);
489489
unsigned struct_mtpos_sz = sizeof(struct mtpos);
490490
unsigned struct_rtentry_sz = sizeof(struct rtentry);
491-
#if SANITIZER_GLIBC || SANITIZER_ANDROID
492-
unsigned struct_termio_sz = sizeof(struct termio);
493-
#endif
494491
unsigned struct_vt_consize_sz = sizeof(struct vt_consize);
495492
unsigned struct_vt_sizes_sz = sizeof(struct vt_sizes);
496493
unsigned struct_vt_stat_sz = sizeof(struct vt_stat);

system/lib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,6 @@ extern unsigned struct_hd_geometry_sz;
10591059
extern unsigned struct_input_absinfo_sz;
10601060
extern unsigned struct_input_id_sz;
10611061
extern unsigned struct_mtpos_sz;
1062-
extern unsigned struct_termio_sz;
10631062
extern unsigned struct_vt_consize_sz;
10641063
extern unsigned struct_vt_sizes_sz;
10651064
extern unsigned struct_vt_stat_sz;

system/lib/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
#include <sys/types.h> // for pid_t
3232
#include <sys/uio.h> // for iovec
3333
#include <elf.h> // for NT_PRSTATUS
34-
#if (defined(__aarch64__) || SANITIZER_RISCV64 || SANITIZER_LOONGARCH64) && \
34+
#if (defined(__aarch64__) || defined(__powerpc64__) || \
35+
SANITIZER_RISCV64 || SANITIZER_LOONGARCH64) && \
3536
!SANITIZER_ANDROID
3637
// GLIBC 2.20+ sys/user does not include asm/ptrace.h
3738
# include <asm/ptrace.h>

system/lib/compiler-rt/readme.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
llvm's compiler-rt
22
------------------
33

4-
These files are from the llvm-project based on release 20.1.4.
4+
These files are from the llvm-project based on release 20.1.8.
55

66
We maintain a local fork of llvm-project that contains any emscripten
77
specific patches:
@@ -20,4 +20,4 @@ Modifications
2020

2121
For a list of changes from upstream see the compiler-rt files that are part of:
2222

23-
https://github.com/llvm/llvm-project/compare/llvmorg-20.1.4...emscripten-core:emscripten-libs-20
23+
https://github.com/llvm/llvm-project/compare/llvmorg-20.1.8...emscripten-core:emscripten-libs-20

system/lib/libcxx/include/__configuration/availability.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,13 @@
6969

7070
// Availability markup is disabled when building the library, or when a non-Clang
7171
// compiler is used because only Clang supports the necessary attributes.
72-
#if defined(_LIBCPP_BUILDING_LIBRARY) || defined(_LIBCXXABI_BUILDING_LIBRARY) || !defined(_LIBCPP_COMPILER_CLANG_BASED)
72+
//
73+
// We also allow users to force-disable availability markup via the `_LIBCPP_DISABLE_AVAILABILITY`
74+
// macro because that is the only way to work around a Clang bug related to availability
75+
// attributes: https://github.com/llvm/llvm-project/issues/134151.
76+
// Once that bug has been fixed, we should remove the macro.
77+
#if defined(_LIBCPP_BUILDING_LIBRARY) || defined(_LIBCXXABI_BUILDING_LIBRARY) || \
78+
!defined(_LIBCPP_COMPILER_CLANG_BASED) || defined(_LIBCPP_DISABLE_AVAILABILITY)
7379
# undef _LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS
7480
# define _LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS 0
7581
#endif

system/lib/libcxx/include/__flat_map/flat_map.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class flat_map {
113113

114114
class value_compare {
115115
private:
116-
key_compare __comp_;
116+
_LIBCPP_NO_UNIQUE_ADDRESS key_compare __comp_;
117117
_LIBCPP_HIDE_FROM_ABI value_compare(key_compare __c) : __comp_(__c) {}
118118
friend flat_map;
119119

0 commit comments

Comments
 (0)