Remove internal settings.LTO in favor of options.lto - #27422
Open
sbc100 wants to merge 1 commit into
Open
Conversation
kripken
reviewed
Jul 28, 2026
|
|
||
|
|
||
| def lld_flags_for_executable(external_symbols): | ||
| from .cmdline import options |
Member
There was a problem hiding this comment.
Is this cleaner than using a Setting?
Collaborator
Author
There was a problem hiding this comment.
As I mentioned in the PR description the goal here is really: "In the long run I hope to use internal settings only for values that need to flow out the the JS compiler."
If a certain setting is only used in python code there is no need for it to be setting at all. Hopefully we can make more use of cmdline.options instead.
Collaborator
Author
There was a problem hiding this comment.
You we right though this import here is kind of ugly, it should be at the top level.
sbc100
force-pushed
the
remove_lto_setting
branch
from
July 28, 2026 23:58
20e97bd to
918b083
Compare
Followup to emscripten-core#27407 Because `settings.LTO` was an internal setting not used anywhere in JavaScript libraries or runtime code. This change removes `LTO` from `src/settings_internal.js` and stores `-flto` / `-fno-lto` state in `options.lto` on `EmccOptions` instead.
sbc100
force-pushed
the
remove_lto_setting
branch
from
July 28, 2026 23:59
918b083 to
9e96101
Compare
kripken
reviewed
Jul 29, 2026
|
|
||
|
|
||
| def get_lib_dir(absolute): | ||
| from .cmdline import options |
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.
Followup to #27407
Because
settings.LTOwas an internal setting not used anywhere in JavaScript libraries or runtime code. This change removesLTOfromsrc/settings_internal.jsand stores-flto/-fno-ltostate inoptions.ltoonEmccOptionsinstead.In the long run I hope to use internal settings only for values that need to flow out the the JS compiler.