Skip to content

Reorganize and simplify the libpreopen code#110

Merged
sunfishcode merged 1 commit intomasterfrom
po-opt
Nov 4, 2019
Merged

Reorganize and simplify the libpreopen code#110
sunfishcode merged 1 commit intomasterfrom
po-opt

Conversation

@sunfishcode
Copy link
Copy Markdown
Member

wasi-libc's copy of libpreopen has evolved so many local changes that it's no longer worth keeping the upstream code structure and marking changes with __wasilibc_unmodified_upstream.

This PR merges the source files into a single file, removes all __wasilibc_unmodified_upstream code, eliminates the ability to allocate multiple preopen lists, eliminates the need for __wasilibc_init_preopen, eliminates the non-standard eaccess, and makes several other cleanups. It also enables NDEBUG so that internal assertions are disabled in release builds.

This was referenced Oct 18, 2019
@sunfishcode sunfishcode force-pushed the po-opt branch 2 times, most recently from 4e4d6ca to 6a4d18f Compare October 22, 2019 13:25
@sunfishcode sunfishcode changed the title Reorganize the libpreopen code Reorganize and simplify the libpreopen code Oct 22, 2019
@sunfishcode
Copy link
Copy Markdown
Member Author

I've now simplified this PR, by removing two followup optimizations (which I'll submit separately), to make it easier to review.

wasi-libc's copy of libpreopen has evolved so many local changes that
it's no longer worth keeping the upstream code structure and marking
changes with __wasilibc_unmodified_upstream.

This PR merges the source files into a single file, removes all
__wasilibc_unmodified_upstream code, eliminates the ability to
allocate multiple preopen lists, eliminates the need for
__wasilibc_init_preopen, eliminates the non-standard eaccess, and
makes several other cleanups. It also enables NDEBUG so that internal
assertions are disabled in release builds.
Copy link
Copy Markdown
Member

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

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

Maybe worth moving into sources now that its just single C file. Fine with this change as is though.

@sunfishcode sunfishcode merged commit 7fcc4f2 into master Nov 4, 2019
@sunfishcode sunfishcode deleted the po-opt branch November 4, 2019 22:56
@sunfishcode
Copy link
Copy Markdown
Member Author

It still is derived from libpreopen code, so it's still useful to keep it in its own directory since it has a different license from the code in sources.

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