Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion tools/system_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,15 @@ class libcompiler_rt(MTLibrary, SjLjLibrary):
# restriction soon: https://reviews.llvm.org/D71738
force_object_files = True

cflags = ['-fno-builtin', '-DNDEBUG', '-DCOMPILER_RT_HAS_ATOMICS=1']
cflags = [
'-fno-builtin',
'-DNDEBUG',
'-DCOMPILER_RT_HAS_ATOMICS=1',
# TODO: Remove this if the emutls_key_created variable in emutls.c is
# fixed or if the scope of the warning is modified again (see
# https://github.com/llvm/llvm-project/pull/178342)
'-Wno-unused-but-set-variable',
]
src_dir = 'system/lib/compiler-rt/lib/builtins'
profile_src_dir = 'system/lib/compiler-rt/lib/profile'
includes = ['system/lib/libc', 'system/lib/compiler-rt/include']
Expand Down Expand Up @@ -1073,6 +1081,9 @@ class libc(MuslInternalLibrary,
'-Wno-string-plus-int',
'-Wno-missing-braces',
'-Wno-logical-op-parentheses',
# TODO: remove this if the cause variable in cxa_default_handlers
# is fixed or if the scope of the warning is reduced (see
# https://github.com/llvm/llvm-project/pull/178342)
'-Wno-unused-but-set-variable',
'-Wno-unused-variable',
'-Wno-unused-label',
Expand Down Expand Up @@ -1621,6 +1632,7 @@ class libcxxabi(ExceptionLibrary, MTLibrary, DebugLibrary):
'-D_LIBCXXABI_BUILDING_LIBRARY',
'-DLIBCXXABI_NON_DEMANGLING_TERMINATE',
'-std=c++23',
'-Wno-unused-but-set-variable',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this set in libcxxabi upstream too? Or have these warning been fixed on HEAD there?

Copy link
Member Author

@dschuff dschuff Mar 24, 2026

Choose a reason for hiding this comment

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

No, but the issue is present there. There's a static variable that is unread if _LIBCXXABI_NO_EXCEPTIONS is set. So maybe we should fix that upstream, but we'd probably still need to have this until the next time we roll libcxxabi into emscripten. likewise with compiler-rt when __BIONIC__ is not defined.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe worth a comment and/or TODO to remove?

]
includes = ['system/lib/libcxx/src']

Expand Down
Loading