File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,11 @@ include(DispatchAppleOptions)
24
24
option (ENABLE_DISPATCH_INIT_CONSTRUCTOR "enable libdispatch_init as a constructor" ON )
25
25
set (USE_LIBDISPATCH_INIT_CONSTRUCTOR ${ENABLE_DISPATCH_INIT_CONSTRUCTOR} )
26
26
27
- # TODO(compnerd) swift options
27
+ option (BUILD_SHARED_LIBS "build shared libraries" ON )
28
+
29
+ option (USE_GOLD_LINKER "use the gold linker" ON )
28
30
29
- # TODO(compnerd) consider adding a flag for USE_GOLD_LINKER. Currently, we
30
- # expect the user to specify `-fuse-ld=gold`
31
+ # TODO(compnerd) swift options
31
32
32
33
option (ENABLE_THREAD_LOCAL_STORAGE "enable usage of thread local storage via __thread" ON )
33
34
set (DISPATCH_USE_THREAD_LOCAL_STORAGE ${ENABLE_THREAD_LOCAL_STORAGE} )
Original file line number Diff line number Diff line change @@ -111,6 +111,11 @@ target_include_directories(dispatch
111
111
${CMAKE_SOURCE_DIR}
112
112
${CMAKE_CURRENT_SOURCE_DIR}
113
113
${CMAKE_SOURCE_DIR} /private )
114
+ if (USE_GOLD_LINKER )
115
+ target_link_libraries (dispatch
116
+ PRIVATE
117
+ -fuse-ld=gold )
118
+ endif ()
114
119
if (WITH_PTHREAD_WORKQUEUES )
115
120
target_include_directories (dispatch
116
121
SYSTEM BEFORE PRIVATE
You can’t perform that action at this time.
0 commit comments