Repository navigation
Conversation
…er]` A `#warning` in a JS library was reported three times on the first build: warning: liba.js:1: #warning This is a test. warning: liba.js:1: #warning This is a test. emcc: warning: warnings in JS library compilation [-Wjs-compiler] The JS compiler runs twice per link, first to list the available JS symbols and then to generate the JS output, and both runs printed the warning. The third line was then added by emcc. Now we get: emcc: warning: liba.js:1: #warning This is a test. [-Wjs-compiler] - The symbol listing run no longer prints warnings when the run that generates JS follows it. When it is the only run (wasm-only output, side modules) it still prints them, and its result is no longer cached in that case, since a cache hit would hide them on later builds. - The JS compiler reports its warnings in the same form as emcc's own: prefixed with the name of the tool, as clang does for its driver warnings, and tagged with `[-Wjs-compiler]`. The tag is left off when the message already names a more specific flag, as the `-Wdeprecated` warning for legacy library symbols does. - `-Wno-js-compiler` now suppresses these warnings. Previously it only suppressed the summary line. - The summary line is now only printed when the warnings are errors, e.g. with `-Werror`, where it is what fails the build. Warnings that only the symbol listing run produces, about library symbols that end up not being included, are no longer shown when JS output is generated. They were only ever shown on builds that missed the symbol list cache. Fixes: emscripten-core#26577 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
juj
force-pushed
the
js_library_warning_once
branch
from
December 1, 2026 00:05
daa55e5 to
6771603
Compare
Collaborator
|
This seems like quite a big change for a small-ish benefit. Is the the mulitple-line issue something that is really a problem on your end? |
Collaborator
Author
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fix a single
#warningstatement emitting multiple lines of warnings.Fixes: #26577