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 <alexey.edelev@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
Łukasz Matysiak 2023-09-26 07:20:45 +02:00 committed by Łukasz Matysiak
parent f791570b86
commit c661dbd42d

View File

@ -49,6 +49,15 @@ function(qt_internal_setup_public_platform_target)
target_compile_options(Platform INTERFACE "$<$<CXX_COMPILER_ID:Clang>:-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