Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ports/libffi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,27 @@ 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)
# which in turn causes MSBUILD to stop.
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})
Expand Down
2 changes: 1 addition & 1 deletion ports/libffi/CONTROL
Original file line number Diff line number Diff line change
@@ -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