File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ include(CheckCSourceCompiles)
122
122
include (CheckFunctionExists )
123
123
include (CheckIncludeFiles )
124
124
include (CheckLibraryExists )
125
+ include (CheckLinkerFlag )
125
126
include (CheckSymbolExists )
126
127
include (GNUInstallDirs )
127
128
include (CTest )
@@ -175,6 +176,8 @@ option(ENABLE_THREAD_LOCAL_STORAGE "enable usage of thread local storage via _Th
175
176
set (DISPATCH_USE_THREAD_LOCAL_STORAGE ${ENABLE_THREAD_LOCAL_STORAGE} )
176
177
177
178
179
+ check_linker_flag (C "LINKER:--build-id=sha1" LINKER_SUPPORTS_BUILD_ID )
180
+
178
181
check_symbol_exists (__GNU_LIBRARY__ "features.h" _GNU_SOURCE )
179
182
if (_GNU_SOURCE )
180
183
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE )
Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ endif()
22
22
set_target_properties (BlocksRuntime PROPERTIES
23
23
POSITION_INDEPENDENT_CODE TRUE )
24
24
25
+ if (LINKER_SUPPORTS_BUILD_ID )
26
+ target_link_options (BlocksRuntime PRIVATE "LINKER:--build-id=sha1" )
27
+ endif ()
28
+
25
29
add_library (BlocksRuntime::BlocksRuntime ALIAS BlocksRuntime )
26
30
27
31
install (FILES Block .h
Original file line number Diff line number Diff line change @@ -178,6 +178,10 @@ if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows")
178
178
set_target_properties (dispatch PROPERTIES INSTALL_RPATH "$ORIGIN" )
179
179
endif ()
180
180
181
+ if (LINKER_SUPPORTS_BUILD_ID )
182
+ target_link_options (dispatch PRIVATE "LINKER:--build-id=sha1" )
183
+ endif ()
184
+
181
185
if (ENABLE_SWIFT )
182
186
add_subdirectory (swift )
183
187
endif ()
You can’t perform that action at this time.
0 commit comments