Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Nov 15, 2025

This allows the -Bdynamic flag to be moved there which is its logical place. It also theoretically allows user flags to override any system flags.

@sbc100 sbc100 requested review from dschuff and kripken November 15, 2025 02:17
@sbc100 sbc100 enabled auto-merge (squash) November 15, 2025 04:06
@kripken
Copy link
Member

kripken commented Nov 17, 2025

It also theoretically allows user flags to override any system flags.

Is this perhaps going to break some users that depended on the current order?

@sbc100
Copy link
Collaborator Author

sbc100 commented Nov 17, 2025

It also theoretically allows user flags to override any system flags.

Is this perhaps going to break some users that depended on the current order?

The only users who might be effected are those that pass wasm-specific -Wl,xxx flags. They might find that these flags are no longer ignore/overridden by emscripten, since we now place the emscripten defaults first.

IMHO this behaviour is more correct. If a users specifies -Wl,xxx we should probably honor that.

Its a very unlikely use case though.. since how/why would such as flag ever have been added but such a user if was to be ignored anyway. I will add a ChangeLog entry just in case anyway.

@sbc100 sbc100 force-pushed the lld_flags_for_executable branch 4 times, most recently from ef708d4 to d88945d Compare November 17, 2025 17:53
This allows the `-Bdynamic` flag to be moved there which is its logical
place.  It also theoretically allows user flags to override any system
flags.
@sbc100 sbc100 force-pushed the lld_flags_for_executable branch from d88945d to fe7d05c Compare November 17, 2025 17:54
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

lgtm with a test - as you say the new behavior is more correct, let's make sure we continue to have that behavior

@sbc100 sbc100 merged commit 55aef98 into emscripten-core:main Nov 17, 2025
34 checks passed
@sbc100 sbc100 deleted the lld_flags_for_executable branch November 17, 2025 20:53
@kripken
Copy link
Member

kripken commented Nov 17, 2025

Oops, I didn't notice automerge...

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.

2 participants