Skip to content

Exclude malloc dependencies from LTO. NFC#19174

Merged
sbc100 merged 1 commit intomainfrom
sbrk_lto
Apr 14, 2023
Merged

Exclude malloc dependencies from LTO. NFC#19174
sbc100 merged 1 commit intomainfrom
sbrk_lto

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented Apr 13, 2023

IIUC sbrk.c was implicitly being excluded from LTO by being added to libmalloc instead of libc, even though it makes more sense in libc.

sbrk depends on emscripten_get_heap_size, so an alternative to this change would be to move emscripten_get_heap_size into libmalloc, but since neither of those two files depends on the malloc type I think this approach makes more sense.

Split out from #18905

@sbc100 sbc100 requested a review from kripken April 13, 2023 20:33
@sbc100 sbc100 enabled auto-merge (squash) April 13, 2023 21:03
@sbc100 sbc100 force-pushed the sbrk_lto branch 4 times, most recently from 4572207 to 85e7a12 Compare April 14, 2023 00:01
IIUC `sbrk.c` was implicitly being excluded from LTO by being added to
`libmalloc` instead of `libc`, even though it makes more sense in
`libc`.

sbrk depends on `emscripten_get_heap_size`, so an alternative to this
change would be to move `emscripten_get_heap_size` into libmalloc, but
since neither of those two files depends on the malloc type I think this
approach makes more sense.

Split out from #18905
@sbc100 sbc100 merged commit 309581e into main Apr 14, 2023
@sbc100 sbc100 deleted the sbrk_lto branch April 14, 2023 01:19
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 24, 2024
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 25, 2024
@sbc100 sbc100 mentioned this pull request Oct 25, 2024
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 25, 2024
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 25, 2024
sbc100 added a commit that referenced this pull request Oct 25, 2024
This effectively reverts #19174

Fixes: #21223
MPurscheUnity pushed a commit to Unity-Technologies/emscripten that referenced this pull request May 14, 2025
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