diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f324531..2d5716d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -111,8 +111,6 @@ jobs: npm install --skip-proj-native --build-wasm-from-source --verbose --foreground-scripts \ ${{ inputs.enable_tiff && '--enable-tiff' || '--disable-tiff' }} \ ${{ inputs.inline_projdb && '--enable-inline-projdb' || '--disable-inline-projdb' }} - ${EMSDK}/upstream/bin/wasm-opt --enable-bulk-memory --enable-threads --converge -Oz lib/binding/emscripten-wasm32/proj.wasm -o proj.opt.wasm - mv proj.opt.wasm lib/binding/emscripten-wasm32/proj.wasm if: inputs.wasm - name: Build the native ASAN version diff --git a/meson.build b/meson.build index 5040db0..5b91cb4 100644 --- a/meson.build +++ b/meson.build @@ -48,6 +48,8 @@ wasm = meson.get_compiler('cpp').get_id() == 'emscripten' if wasm add_project_arguments([ '-Wno-documentation' ], language: [ 'cpp', 'c' ]) add_project_arguments([ '-Wno-potentially-evaluated-expression' ], language: [ 'cpp' ]) + add_project_arguments([ '-sBINARYEN_EXTRA_PASSES="--enable-bulk-memory,--enable-threads,--converge,-Oz"' ], language: [ 'cpp', 'c' ]) + add_project_link_arguments([ '-sBINARYEN_EXTRA_PASSES="--enable-bulk-memory,--enable-threads,--converge,-Oz"' ], language: [ 'cpp', 'c' ]) endif # Build PROJ and its dependencies