Implement wasm trap handlers. (#27)
* Implement wasm trap handlers. This adds signal handlers based on SpiderMonkey's signal-handler code. The functionality for looking up the trap code and wasm bytecode offset isn't yet implemented, but this is a start. I considered rewriting this code in Rust, but decided against it for now as C++ allows us to talk to the relevant OS APIs more directly. Fixes #15. * Compile with -std=c++11. * Refactor InstallState initialization. * Compile with -fPIC. * Factor out the code for calling a wasm function with a given index. * Fix unclear wording in a comment.
This commit is contained in:
8
lib/execute/signalhandlers/CMakeLists.txt
Normal file
8
lib/execute/signalhandlers/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(SignalHandlers CXX)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-std=c++11 -fno-exceptions -fno-rtti -fPIC")
|
||||
|
||||
add_library(SignalHandlers STATIC SignalHandlers.cpp)
|
||||
|
||||
install(TARGETS SignalHandlers DESTINATION .)
|
||||
Reference in New Issue
Block a user