Skip to content

Commit

Permalink
Optimised WASM Binary
Browse files Browse the repository at this point in the history
Removed duplication
Removed debug commands
Added O2 optimatisation
  • Loading branch information
Dialpuri committed Oct 30, 2023
1 parent ad33fe3 commit cf2ce4c
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 300,815 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
cmake_minimum_required(VERSION 3.12)
project(privateer VERSION 0.5 LANGUAGES C CXX)

SET(PRIVATEER_CC_FLAGS "-g -O0 -w")
SET(PRIVATEER_CXX_FLAGS "-g -O0 -w -fwasm-exceptions -I${CMAKE_INSTALL_PREFIX}/include")
SET(PRIVATEER_CC_FLAGS "-O2 -w")
SET(PRIVATEER_CXX_FLAGS "-O2 -w -fwasm-exceptions -I${CMAKE_INSTALL_PREFIX}/include")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PRIVATEER_CC_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PRIVATEER_CXX_FLAGS} ")

Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ source ~/dev/privateer_wasm/emsdk/emsdk_env.sh
emcmake cmake .
emmake make -j

cp privateer.js webserver/api/privateer.js
cp privateer.wasm webserver/api/privateer.wasm
cp privateer.data webserver/api/privateer.data
# cp privateer.js webserver/api/privateer.js
# cp privateer.wasm webserver/api/privateer.wasm
# cp privateer.data webserver/api/privateer.data

mv privateer.js webserver/src/wasm/privateer.js
mv privateer.wasm webserver/src/wasm/privateer.wasm
Expand Down
Loading

0 comments on commit cf2ce4c

Please sign in to comment.