diff --git a/ports/libffi/CMakeLists.txt b/ports/libffi/CMakeLists.txt index b8b70db5d..c85e6382c 100644 --- a/ports/libffi/CMakeLists.txt +++ b/ports/libffi/CMakeLists.txt @@ -120,8 +120,13 @@ macro(add_assembly ASMFILE) COMMAND ${CMAKE_C_COMPILER} /nologo /EP /I. /Iinclude /I${CMAKE_CURRENT_SOURCE_DIR}/include "${ASMFILE_FULL}" WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE ${ARCH_ASM_NAME}.asm + RESULT_VARIABLE retcode ) + if(NOT ${retcode} STREQUAL "0") + message(FATAL_ERROR "Unable to assemble, exit code: '${retcode}'.") + endif() + # Produced *.asm file could be just added to sources. # It works in x64 mode, but for some strange reason MASM returns error code when in x86, # (even though it didn't report any errors and correctly generated object file) @@ -129,8 +134,13 @@ macro(add_assembly ASMFILE) execute_process( COMMAND ${ARCH_ASSEMBLER} ${ARCH_ASM_NAME}.asm WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + RESULT_VARIABLE retcode ) + if(NOT ${retcode} STREQUAL "0") + message(FATAL_ERROR "Unable to compile assembly, exit code: '${retcode}'.") + endif() + list(APPEND FFI_SOURCES ${CMAKE_BINARY_DIR}/${ARCH_ASM_NAME}.obj) else() list(APPEND FFI_SOURCES ${ASMFILE}) diff --git a/ports/libffi/CONTROL b/ports/libffi/CONTROL index 70e108a73..655f6023c 100644 --- a/ports/libffi/CONTROL +++ b/ports/libffi/CONTROL @@ -1,4 +1,4 @@ Source: libffi -Version: 3.3-1 +Version: 3.3-2 Homepage: https://github.com/libffi/libffi Description: Portable, high level programming interface to various calling conventions \ No newline at end of file