aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-11-26 01:07:10 +0800
committerGitHub <noreply@github.com>2016-11-26 01:07:10 +0800
commit9c2ed33e9aa2e2f037cbe4fa7491bf4bd8b5616b (patch)
tree1cc882f0bbf43817fa6fb1aa380aaa651aceff03 /cmake
parentd7677826d478efde1d9ded200fb40255aa082672 (diff)
parent7bbaeedc317096ef89a10c87313f15b020d5adee (diff)
downloaddexon-solidity-9c2ed33e9aa2e2f037cbe4fa7491bf4bd8b5616b.tar
dexon-solidity-9c2ed33e9aa2e2f037cbe4fa7491bf4bd8b5616b.tar.gz
dexon-solidity-9c2ed33e9aa2e2f037cbe4fa7491bf4bd8b5616b.tar.bz2
dexon-solidity-9c2ed33e9aa2e2f037cbe4fa7491bf4bd8b5616b.tar.lz
dexon-solidity-9c2ed33e9aa2e2f037cbe4fa7491bf4bd8b5616b.tar.xz
dexon-solidity-9c2ed33e9aa2e2f037cbe4fa7491bf4bd8b5616b.tar.zst
dexon-solidity-9c2ed33e9aa2e2f037cbe4fa7491bf4bd8b5616b.zip
Merge pull request #1342 from ethereum/emscripten-codesize
Emscripten code size improvements [WIP TEST]
Diffstat (limited to 'cmake')
-rw-r--r--cmake/EthCompilerSettings.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake
index 0c307288..c734423b 100644
--- a/cmake/EthCompilerSettings.cmake
+++ b/cmake/EthCompilerSettings.cmake
@@ -155,6 +155,9 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
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} -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)
endif()
endif()