Skip to content

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Aug 20, 2024

In order to make this new test even compile I moved the declaration of dynCalls from being hand coded in python to being decoratively included in library.js, which makes more sense anyway.

See #22416

@sbc100 sbc100 requested review from brendandahl and kripken August 20, 2024 20:37

# Decide whether we should generate the global dynCalls dictionary for the dynCall() function?
if settings.DYNCALLS and '$dynCall' in settings.DEFAULT_LIBRARY_FUNCS_TO_INCLUDE and len([x for x in exports if x.startswith('dynCall_')]) > 0:
if settings.DYNCALLS or not settings.WASM_BIGINT or '$dynCall' in settings.DEFAULT_LIBRARY_FUNCS_TO_INCLUDE:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this change suppose to be in here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, without this the simple test doesn't compile due to closure warning about dynCalls symbol being missing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually I found a better way to express this dependency precisely in library.js where it belongs.

@sbc100 sbc100 force-pushed the embind_codesize_test branch from 40a2464 to e377bf1 Compare August 20, 2024 20:39
@sbc100 sbc100 force-pushed the embind_codesize_test branch from e377bf1 to 0686d07 Compare August 20, 2024 20:44
@sbc100 sbc100 requested a review from brendandahl August 20, 2024 20:57
@sbc100 sbc100 merged commit 5729f56 into emscripten-core:main Aug 20, 2024
@sbc100 sbc100 deleted the embind_codesize_test branch August 20, 2024 22:59

#if DYNCALLS || !WASM_BIGINT
#if MINIMAL_RUNTIME
$dynCalls: '[]',
Copy link
Member

Choose a reason for hiding this comment

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

This was {} before, and it does seem to be used more like a map than an array - why was this changed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops you are right... it should be {}

sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 20, 2024
sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 21, 2024
sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 21, 2024
sbc100 added a commit that referenced this pull request Aug 21, 2024
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.

3 participants