Skip to content

Ifdef wasmBinaryFile assignment from SINGLE_FILE builds.#21587

Merged
juj merged 1 commit intoemscripten-core:mainfrom
juj:ifdef_wasm_locatefile
Mar 26, 2024
Merged

Ifdef wasmBinaryFile assignment from SINGLE_FILE builds.#21587
juj merged 1 commit intoemscripten-core:mainfrom
juj:ifdef_wasm_locatefile

Conversation

@juj
Copy link
Collaborator

@juj juj commented Mar 21, 2024

Spliced from #21478 (comment)

if (Module['locateFile']) {
#endif
wasmBinaryFile = '{{{ WASM_BINARY_FILE }}}';
#if !SINGLE_FILE
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suppose this is because we know a priori that wasmBinaryFile is a data URI in this mode?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this not change any of our code size expectations?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I suppose this is because we know a priori that wasmBinaryFile is a data URI in this mode?

Yeah, that's right. In SINGLE_FILE builds the Wasm content is embedded, so locateFile is not needed.

Does this not change any of our code size expectations?

Looks like not, CI shows green.

@juj juj merged commit 6ad821f into emscripten-core:main Mar 26, 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.

2 participants