Add "-sABORTING_MALLOC=0" to the default flags for emscripten toolchains
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
		
							parent
							
								
									5f1e8482cd
								
							
						
					
					
						commit
						1622096d8b
					
				@ -58,7 +58,7 @@ if (${IS_GNU} OR ${IS_CLANG})
 | 
				
			|||||||
    if (NOT DEFINED EMSCRIPTEN)
 | 
					    if (NOT DEFINED EMSCRIPTEN)
 | 
				
			||||||
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong -fstack-clash-protection")
 | 
					        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong -fstack-clash-protection")
 | 
				
			||||||
    else()
 | 
					    else()
 | 
				
			||||||
        set(CMAKE_EXE_LINKER_FLAGS "--closure 1 -sWASM=0 --memory-init-file 0 -sEXPORTED_FUNCTIONS=_main -sEXIT_RUNTIME=1 -sSINGLE_FILE=1 -sSAFE_HEAP=1 ${CMAKE_EXE_LINKER_FLAGS}")
 | 
					        set(CMAKE_EXE_LINKER_FLAGS "--closure 1 -sWASM=0 --memory-init-file 0 -sEXPORTED_FUNCTIONS=_main -sEXIT_RUNTIME=1 -sSINGLE_FILE=1 -sSAFE_HEAP=1 -sABORTING_MALLOC=0 ${CMAKE_EXE_LINKER_FLAGS}")
 | 
				
			||||||
        if (CMAKE_USE_PTHREADS_INIT)
 | 
					        if (CMAKE_USE_PTHREADS_INIT)
 | 
				
			||||||
            set(CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS}") # Emscripten requires the -pthread flag
 | 
					            set(CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS}") # Emscripten requires the -pthread flag
 | 
				
			||||||
            set(CMAKE_EXE_LINKER_FLAGS "--closure-args=\"--compilation_level SIMPLE\" -sPROXY_TO_PTHREAD=1 ${CMAKE_EXE_LINKER_FLAGS}") # See https://github.com/emscripten-core/emscripten/issues/16706
 | 
					            set(CMAKE_EXE_LINKER_FLAGS "--closure-args=\"--compilation_level SIMPLE\" -sPROXY_TO_PTHREAD=1 ${CMAKE_EXE_LINKER_FLAGS}") # See https://github.com/emscripten-core/emscripten/issues/16706
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user