mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add optimisation flags for Emscripten
This commit is contained in:
parent
6e0934664b
commit
7bbaeedc31
@ -155,6 +155,9 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
|
|||||||
|
|
||||||
if (EMSCRIPTEN)
|
if (EMSCRIPTEN)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --memory-init-file 0 -O3 -s LINKABLE=1 -s DISABLE_EXCEPTION_CATCHING=0 -s NO_EXIT_RUNTIME=1 -s ALLOW_MEMORY_GROWTH=1 -s NO_DYNAMIC_EXECUTION=1")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --memory-init-file 0 -O3 -s LINKABLE=1 -s DISABLE_EXCEPTION_CATCHING=0 -s NO_EXIT_RUNTIME=1 -s ALLOW_MEMORY_GROWTH=1 -s NO_DYNAMIC_EXECUTION=1")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -ffunction-sections -Wl,--gc-sections")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s NO_FILESYSTEM=1 -s AGGRESSIVE_VARIABLE_ELIMINATION=1")
|
||||||
add_definitions(-DETH_EMSCRIPTEN=1)
|
add_definitions(-DETH_EMSCRIPTEN=1)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -95,8 +95,8 @@ emmake make -j 4
|
|||||||
cd ..
|
cd ..
|
||||||
cp build/solc/soljson.js ./
|
cp build/solc/soljson.js ./
|
||||||
|
|
||||||
OUTPUT_SIZE=`stat -f "%z" build/solc/soljson.js`
|
OUTPUT_SIZE=`ls -la build/solc/soljson.js`
|
||||||
|
|
||||||
echo "Emscripten output size: $OUTPUT_SIZE"
|
echo "Emscripten output size: ${OUTPUT_SIZE}"
|
||||||
|
|
||||||
echo -en 'travis_fold:end:compiling_solidity\\r'
|
echo -en 'travis_fold:end:compiling_solidity\\r'
|
||||||
|
Loading…
Reference in New Issue
Block a user