1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-24 02:00:41 +03:00
nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-darwin-fix-bootstrap.patch
2022-10-10 21:26:47 +02:00

20 lines
801 B
Diff

This patch fixes dylib references during bootstrapping. It's possible
`LIBSWIFT_BUILD_MODE=BOOTSTRAPPING` is not really well tested on Darwin,
because official builds don't use it.
In the near future, Swift will require an existing Swift toolchain to
bootstrap, and we will likely have to replace this any way.
--- a/stdlib/cmake/modules/AddSwiftStdlib.cmake
+++ b/stdlib/cmake/modules/AddSwiftStdlib.cmake
@@ -1035,6 +1035,10 @@ function(add_swift_target_library_single target name)
set(install_name_dir "${SWIFTLIB_SINGLE_DARWIN_INSTALL_NAME_DIR}")
endif()
+ if(DEFINED SWIFTLIB_SINGLE_BOOTSTRAPPING)
+ set(install_name_dir "${lib_dir}/${output_sub_dir}")
+ endif()
+
set_target_properties("${target}"
PROPERTIES
INSTALL_NAME_DIR "${install_name_dir}")