aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorderselbst <tom.mbrt@googlemail.com>2020-03-19 14:32:07 +0100
committerderselbst <tom.mbrt@googlemail.com>2020-04-08 10:20:44 +0200
commita4a5c65cc82d104aae260f4e6abf6b7ea9a2ee13 (patch)
tree23ee6b0dcd028a613d476bb25ee0208e666e5329
parenta3a6e703448b58b0d86ff4b6b5f658b8d26cd76d (diff)
downloadvcpkg-a4a5c65cc82d104aae260f4e6abf6b7ea9a2ee13.tar.gz
vcpkg-a4a5c65cc82d104aae260f4e6abf6b7ea9a2ee13.zip
[libffi] Check return value of execute_process()
To avoid hiding errors, the return values of the execute_process() commands should be checked and a fatal error should be issued.
-rw-r--r--ports/libffi/CMakeLists.txt10
-rw-r--r--ports/libffi/CONTROL2
2 files changed, 11 insertions, 1 deletions
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