wasm: Update EMCC_OPTIONS default behavior #491
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The existing
build_wasm.sh
script always enablesWASM_BIGINT
, which is necessary for the NPM WASM package but has to be disabled for the esplora build.This commit changes the default behavior to enable all options necessary for the NPM package (
WASM_BIGINT
plusEXPORT_ES6
too), while allowing the esplora build to override it with a separate set of options (MODULARIZE
andEXPORT_NAME
only).The esplora build process already sets the appropriate
EMCC_OPTIONS
, so no changes necessary there. With this PR merged, we can update the esplora build to use the latest libwally (it currently uses an older version which did not setWASM_BIGINT
, and would not work against libwally's current master).This also updates the libwally gitlab CI build to use the correct
EMCC_OPTIONS
for esplora.However I'm not quite sure why these options are duplicated in this repo. Wouldn't it be better to let the esplora build process control them? So for example, if a new
EXPORTED_FUNCTION
is needed for esplora the changes would be contained in the esplora repo and won't require sending PRs to two separate repos.