diff options
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/cmake-disable-rpath.patch')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/cmake-disable-rpath.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/cmake-disable-rpath.patch b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/cmake-disable-rpath.patch new file mode 100644 index 000000000000..9aeba452f9e8 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/cmake-disable-rpath.patch @@ -0,0 +1,36 @@ +Disable rpath for the bootstrap build with CMake. + +--- a/Sources/PackageDescription/CMakeLists.txt ++++ b/Sources/PackageDescription/CMakeLists.txt +@@ -31,14 +31,11 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin) + set(SWIFT_INTERFACE_PATH ${CMAKE_BINARY_DIR}/pm/ManifestAPI/PackageDescription.swiftinterface) + target_compile_options(PackageDescription PUBLIC + $<$<COMPILE_LANGUAGE:Swift>:-emit-module-interface-path$<SEMICOLON>${SWIFT_INTERFACE_PATH}>) +- target_link_options(PackageDescription PRIVATE +- "SHELL:-Xlinker -install_name -Xlinker @rpath/libPackageDescription.dylib") + endif() + + set_target_properties(PackageDescription PROPERTIES + Swift_MODULE_NAME PackageDescription + Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/pm/ManifestAPI +- INSTALL_NAME_DIR \\@rpath + OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/pm/ManifestAPI + OUTPUT_NAME PackageDescription + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/pm/ManifestAPI +--- a/Sources/PackagePlugin/CMakeLists.txt ++++ b/Sources/PackagePlugin/CMakeLists.txt +@@ -29,14 +29,11 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin) + set(SWIFT_INTERFACE_PATH ${CMAKE_BINARY_DIR}/pm/PluginAPI/PackagePlugin.swiftinterface) + target_compile_options(PackagePlugin PUBLIC + $<$<COMPILE_LANGUAGE:Swift>:-emit-module-interface-path$<SEMICOLON>${SWIFT_INTERFACE_PATH}>) +- target_link_options(PackagePlugin PRIVATE +- "SHELL:-Xlinker -install_name -Xlinker @rpath/libPackagePlugin.dylib") + endif() + + set_target_properties(PackagePlugin PROPERTIES + Swift_MODULE_NAME PackagePlugin + Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/pm/PluginAPI +- INSTALL_NAME_DIR \\@rpath + OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/pm/PluginAPI + OUTPUT_NAME PackagePlugin + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/pm/PluginAPI |