Skip to content

Commit 25653ac

Browse files
author
Greg Parker
committed
[build] Disallow calls to objc_msgSend() with no function pointer cast.
1 parent 7e38792 commit 25653ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/modules/SwiftSharedCMakeConfig.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@ macro(swift_common_cxx_warnings)
280280
if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
281281
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4068")
282282
endif()
283+
284+
# Disallow calls to objc_msgSend() with no function pointer cast.
285+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOBJC_OLD_DISPATCH_PROTOTYPES=0")
283286
endmacro()
284287

285288
# Like 'llvm_config()', but uses libraries from the selected build

0 commit comments

Comments
 (0)