From cadff3401dc87ff4d3dec6a5ba643f3501f95fe6 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Mon, 15 Jul 2019 08:42:01 -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 ebdfd5d92..da7a201e3 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)