* Support 32-bit build. Signatures/functions/imports/exports etc are defined as varuint32 in the WebAssembly specification so use u32 rather than u64. Decrease the static memory constants for 32-bit addressing mode so that they fit within 32-bit memory constraints. Conditionalize cmake compile of SignalHandlers.cpp so that -m32 is passed when building 32-bit. Add a no-op match for Reloc::X86CallPCRel4 during linking. This is probably the wrong thing, but it allows the tests to pass. Using the same logic from the Reloc::X86PCRel4 case did not work.
13 lines
415 B
CMake
13 lines
415 B
CMake
cmake_minimum_required(VERSION 3.0)
|
|
project(SignalHandlers CXX)
|
|
|
|
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
|
set(CMAKE_CXX_FLAGS "-std=c++11 -fno-exceptions -fno-rtti -fPIC")
|
|
else( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
|
set(CMAKE_CXX_FLAGS "-m32 -std=c++11 -fno-exceptions -fno-rtti -fPIC")
|
|
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
|
|
|
add_library(SignalHandlers STATIC SignalHandlers.cpp)
|
|
|
|
install(TARGETS SignalHandlers DESTINATION .)
|