Include startup crt objects on WASI for more outputs - #161421
Include startup crt objects on WASI for more outputs#161421alexcrichton wants to merge 1 commit into
Conversation
|
r? @fee1-dead rustbot has assigned @fee1-dead. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
bab467a to
db284c5
Compare
|
The run-make-support library was changed cc @jieyouxu |
| @@ -127,6 +127,8 @@ pub(super) fn pre_wasi_self_contained() -> CrtObjects { | |||
| (LinkOutputKind::StaticNoPicExe, &["crt1-command.o"]), | |||
| (LinkOutputKind::StaticPicExe, &["crt1-command.o"]), | |||
| (LinkOutputKind::WasiReactorExe, &["crt1-reactor.o"]), | |||
There was a problem hiding this comment.
Do we still need the separate flag to enable usage of crt1-reactor.o?
There was a problem hiding this comment.
I don't recall the history here myself, but I suspect not, no.
There was a problem hiding this comment.
cc #108097 That PR also changed from --no-entry to --entry _initialize, though not just on wasi, but all wasm targets.
There was a problem hiding this comment.
I'd like to only handle WASI targets here, not all targets. That PR also never landed I believe? The goal of this change is to handle ABI details for the upcoming wasip3 target which is broken without linking these files.
There was a problem hiding this comment.
I'd like to only handle WASI targets here, not all targets.
I'm aware.
That PR also never landed I believe?
Indeed. I was looking at why it never landed. I think because it was also touching other targets.
Wouldn't this PR also need to copy the --no-entry -> --entry _initialize change from that PR, but just for wasi? And maybe copy the table doc table change.
There was a problem hiding this comment.
Sure, I've updated the table. I don't believe the --no-entry change is necessary -- with this PR _initialize is still exported works as intended.
db284c5 to
2188d93
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Sorry, not familiar enough to review :) @rustbot reroll |
|
r? @bjorn3 |
This commit adds the `crt1-reactor.o` object file in the list of
pre-link-crt-objects for the `{Dynamic,Static}Dylib` output kinds for
WASI targets. These previously were omitted I believe by accident and
this means that the conventional `_initialize` function is not present
which runs constructor functions, for example. This is additionally
needed for the upcoming wasip3 target where this startup object file is
more load bearing than it was previously and will become required.
2188d93 to
2089220
Compare
This commit adds the
crt1-reactor.oobject file in the list of pre-link-crt-objects for the{Dynamic,Static}Dyliboutput kinds for WASI targets. These previously were omitted I believe by accident and this means that the conventional_initializefunction is not present which runs constructor functions, for example. This is additionally needed for the upcoming wasip3 target where this startup object file is more load bearing than it was previously and will become required.