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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
801 B
Diff
Raw Normal View History

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}")