Skip to content

Commit fc917b4

Browse files
authored
Merge pull request #503 from compnerd/soname-sosad
build: add DT_SONAME for ELF libraries
2 parents d9740c2 + fe0f888 commit fc917b4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmake/modules/SwiftSupport.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ function(add_swift_target target)
133133
endif()
134134

135135
if(AST_LIBRARY)
136-
set(emit_library -emit-library)
136+
if(CMAKE_SYSTEM_NAME STREQUAL Windows OR CMAKE_SYSTEM_NAME STREQUAL Darwin)
137+
set(emit_library -emit-library)
138+
else()
139+
set(emit_library -emit-library -Xlinker -soname -Xlinker ${AST_OUTPUT})
140+
endif()
137141
endif()
138142
if(NOT AST_LIBRARY OR library_kind STREQUAL SHARED)
139143
add_custom_command(OUTPUT

0 commit comments

Comments
 (0)