|
16 | 16 |
|
17 | 17 | include(EthCheckCXXCompilerFlag)
|
18 | 18 |
|
19 |
| -eth_add_cxx_compiler_flag_if_supported(-fstack-protector-strong have_stack_protector_strong_support) |
20 |
| -if(NOT have_stack_protector_strong_support) |
21 |
| - eth_add_cxx_compiler_flag_if_supported(-fstack-protector) |
| 19 | +if(NOT EMSCRIPTEN) |
| 20 | + eth_add_cxx_compiler_flag_if_supported(-fstack-protector-strong have_stack_protector_strong_support) |
| 21 | + if(NOT have_stack_protector_strong_support) |
| 22 | + eth_add_cxx_compiler_flag_if_supported(-fstack-protector) |
| 23 | + endif() |
22 | 24 | endif()
|
23 | 25 |
|
24 | 26 | eth_add_cxx_compiler_flag_if_supported(-Wimplicit-fallthrough)
|
@@ -109,15 +111,13 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
|
109 | 111 | # Re-enable exception catching (optimisations above -O1 disable it)
|
110 | 112 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s DISABLE_EXCEPTION_CATCHING=0")
|
111 | 113 | # Remove any code related to exit (such as atexit)
|
112 |
| - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s NO_EXIT_RUNTIME=1") |
| 114 | + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXIT_RUNTIME=0") |
113 | 115 | # Remove any code related to filesystem access
|
114 |
| - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s NO_FILESYSTEM=1") |
115 |
| - # Remove variables even if it needs to be duplicated (can improve speed at the cost of size) |
116 |
| - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s AGGRESSIVE_VARIABLE_ELIMINATION=1") |
| 116 | + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s FILESYSTEM=0") |
117 | 117 | # Allow memory growth, but disable some optimisations
|
118 | 118 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s ALLOW_MEMORY_GROWTH=1")
|
119 | 119 | # Disable eval()
|
120 |
| - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s NO_DYNAMIC_EXECUTION=1") |
| 120 | + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s DYNAMIC_EXECUTION=0") |
121 | 121 | # Disable greedy exception catcher
|
122 | 122 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s NODEJS_CATCH_EXIT=0")
|
123 | 123 | # Abort if linking results in any undefined symbols
|
|
0 commit comments