From c661dbd42d87f151e0c6f9e50fb21a137dad850c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Matysiak?= Date: Tue, 26 Sep 2023 07:20:45 +0200 Subject: [PATCH] Add -DQT_NO_INT128 to every target when building for VxWorks qtypes.h defines qint128 and quint128 if __SIZEOF_128__ is defined. VxWorks doesn't support 128bit ints (confirmed by the WindRiver support team and by the fact that std::numeric_limits::is_specialized returns false for those types), but clang defines that symbol anyway. -DQT_NO_INT128 is used to disable support for those types. Task-number: QTBUG-115777 Change-Id: Iea024ad9e35734002ce516ebd8a7fa7f2352be62 Reviewed-by: Alexey Edelev Reviewed-by: Ivan Solovev --- cmake/QtPlatformTargetHelpers.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmake/QtPlatformTargetHelpers.cmake b/cmake/QtPlatformTargetHelpers.cmake index 54d1916f9eb..f1976b9975a 100644 --- a/cmake/QtPlatformTargetHelpers.cmake +++ b/cmake/QtPlatformTargetHelpers.cmake @@ -49,6 +49,15 @@ function(qt_internal_setup_public_platform_target) target_compile_options(Platform INTERFACE "$<$:-fno-direct-access-external-data>") endif() + # Qt checks if a given platform supports 128 bit integers + # by checking if __SIZEOF_128__ is defined + # VXWORKS doesn't support 128 bit integers + # but it uses clang which defines __SIZEOF_128__ + # which breaks the detection mechanism + if(VXWORKS) + target_compile_definitions(Platform INTERFACE "-DQT_NO_INT128") + endif() + qt_set_msvc_cplusplus_options(Platform INTERFACE) # Propagate minimum C++ 17 via Platform to Qt consumers (apps), after the global features