From e593c02c8b791ee4c8ec77fb29969685c22fe596 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Mon, 15 Jul 2019 08:36:13 -0700 Subject: [PATCH] build: correct the `DT_SONAME` When ninja is invoked from a subdirectory it will convert the path to a relative path, and that resulted in incorrect test results. This ensures that we get the correct soname. --- cmake/modules/SwiftSupport.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/SwiftSupport.cmake b/cmake/modules/SwiftSupport.cmake index f29fba2860..b2c8bd3b08 100644 --- a/cmake/modules/SwiftSupport.cmake +++ b/cmake/modules/SwiftSupport.cmake @@ -136,7 +136,7 @@ function(add_swift_target target) if(CMAKE_SYSTEM_NAME STREQUAL Windows OR CMAKE_SYSTEM_NAME STREQUAL Darwin) set(emit_library -emit-library) else() - set(emit_library -emit-library -Xlinker -soname -Xlinker ${AST_OUTPUT}) + set(emit_library -emit-library -Xlinker -soname -Xlinker ${CMAKE_SHARED_LIBRARY_PREFIX}${target}${CMAKE_SHARED_LIBRARY_SUFFIX}) endif() endif() if(NOT AST_LIBRARY OR library_kind STREQUAL SHARED)