aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-02-21 06:23:30 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-02-21 06:28:43 +0800
commitc43953f9fe25066881938944c6a33817be8f424f (patch)
treecaca16c8771d59b6a97fa03b4d0d1254b3c88d06 /cmake
parent70790d4729a8cee7d587bf274ed1733b255b2120 (diff)
downloaddexon-solidity-c43953f9fe25066881938944c6a33817be8f424f.tar.gz
dexon-solidity-c43953f9fe25066881938944c6a33817be8f424f.tar.zst
dexon-solidity-c43953f9fe25066881938944c6a33817be8f424f.zip
CMake: abort if linking results in undefined symbols with emscripten
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 7199f537..a9ed0a74 100644
--- a/cmake/EthCompilerSettings.cmake
+++ b/cmake/EthCompilerSettings.cmake
@@ -140,6 +140,9 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s NO_DYNAMIC_EXECUTION=1")
# Disable greedy exception catcher
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s NODEJS_CATCH_EXIT=0")
+ # Abort if linking results in any undefined symbols
+ # Note: this is on by default in the CMake Emscripten module which we aren't using
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1")
add_definitions(-DETH_EMSCRIPTEN=1)
endif()
endif()