Fix setjmp/longjmp on native Windows (#1331)

* Add setjmp wrapper

* Add to projects

* Use wrapper on x64

* Always build on x64 and exclude on win32

* Fix signature

* Add comments

* Add comments for os-win32.h

* Add extern decleration

* Support cmake Windows build

* Fix for MinGW
This commit is contained in:
lazymio
2020-09-22 02:02:43 +08:00
committed by GitHub
parent 225f6f2889
commit 644da9babc
7 changed files with 73 additions and 3 deletions

View File

@ -859,6 +859,10 @@ if (MSVC)
${CMAKE_CURRENT_SOURCE_DIR}/msvc/unicorn/qapi-types.c
${CMAKE_CURRENT_SOURCE_DIR}/msvc/unicorn/qapi-visit.c
)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
enable_language(ASM_MASM)
set(UNICORN_SRCS ${UNICORN_SRCS} qemu/util/setjmp-wrapper-win32.asm)
endif()
else()
set(UNICORN_SRCS
${UNICORN_SRCS_COMMON}