Skip to content

Commit 6efcf87

Browse files
committed
build: build libdispatch as position independent
When building libdispatch as a static library ensure that it is built as a PIC library. This is implicit when building a shared library. If the library is not built shared, we cannot statically link it on Unix targets. This partially resolves SR-9384!
1 parent fb368f6 commit 6efcf87

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ add_library(dispatch
5454
shims/time.h
5555
shims/tsd.h
5656
shims/yield.h)
57+
58+
set_target_properties(dispatch
59+
PROPERTIES
60+
POSITION_INDEPENDENT_CODE YES)
61+
5762
if(WIN32)
5863
target_sources(dispatch
5964
PRIVATE

0 commit comments

Comments
 (0)