@@ -34,6 +34,9 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
34
34
add_compile_options (-Wall)
35
35
add_compile_options (-Wextra)
36
36
add_compile_options (-Werror)
37
+ add_compile_options (-pedantic)
38
+ add_compile_options (-Wno-unknown-pragmas)
39
+ add_compile_options (-Wimplicit-fallthrough)
37
40
38
41
# Configuration-specific compiler settings.
39
42
set (CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -DETH_DEBUG" )
@@ -110,9 +113,13 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
110
113
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s STRICT=1" )
111
114
# Export the Emscripten-generated auxiliary methods which are needed by solc-js.
112
115
# Which methods of libsolc itself are exported is specified in libsolc/CMakeLists.txt.
113
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS=['cwrap','addFunction','removeFunction','UTF8ToString','lengthBytesUTF8','_malloc','stringToUTF8','setValue']" )
114
- # Do not build as a WebAssembly target - we need an asm.js output.
115
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s WASM=0" )
116
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS=['cwrap','addFunction','removeFunction','UTF8ToString','lengthBytesUTF8','stringToUTF8','setValue']" )
117
+ # Build for webassembly target.
118
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s WASM=1" )
119
+ # Set webassembly build to synchronous loading.
120
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s WASM_ASYNC_COMPILATION=0" )
121
+ # Output a single js file with the wasm binary embedded as base64 string.
122
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s SINGLE_FILE=1" )
116
123
117
124
# Disable warnings about not being pure asm.js due to memory growth.
118
125
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-almost-asm" )
0 commit comments