Skip to content

Commit 93a24b3

Browse files
authored
Merge pull request swiftlang#2407 from compnerd/soname-so-sad
build: add DT_SONAME for ELF libraries
2 parents 701699c + 8bb2aff commit 93a24b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmake/modules/SwiftSupport.cmake

+4
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ function(add_swift_target target)
133133
file(WRITE ${rsp_file} ${rsp_text})
134134

135135
if(AST_LIBRARY)
136+
if(CMAKE_SYSTEM_NAME STREQUAL Windows OR CMAKE_SYSTEM_NAME STREQUAL Darwin)
136137
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)