Skip to content

Set -Wno-unsed-but-set-variable for compiler-rt and libcxxabi#26538

Open
dschuff wants to merge 2 commits intoemscripten-core:mainfrom
dschuff:em_unused
Open

Set -Wno-unsed-but-set-variable for compiler-rt and libcxxabi#26538
dschuff wants to merge 2 commits intoemscripten-core:mainfrom
dschuff:em_unused

Conversation

@dschuff
Copy link
Member

@dschuff dschuff commented Mar 24, 2026

llvm/llvm-project#178342 expanded the scope
of this warning, and it breaks the Emscripten library builds.

@dschuff dschuff requested a review from aheejin March 24, 2026 19:34
'-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?

@dschuff
Copy link
Member Author

dschuff commented Mar 24, 2026

It looks like there is already some discussion on the upstream PR about splitting this into a different warning flag because of the large blast radius and the desire not to disable the warning for locals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants