From 27a0abf6219de1429a78e259b21c95fe4d0fd417 Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Sun, 20 Oct 2024 12:19:48 +0200 Subject: [PATCH] do the binaryen extra pass while building --- .github/workflows/build.yml | 2 -- meson.build | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) 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