Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1Wrap the swift compiler produced during the build 2 3--- a/tools/driver/CMakeLists.txt 4+++ b/tools/driver/CMakeLists.txt 5@@ -16,6 +16,13 @@ if(${LIBSWIFT_BUILD_MODE} MATCHES "BOOTSTRAPPING.*") 6 swiftDriverTool 7 libswiftStub) 8 9+ # Nix: wrap the swift build. 10+ add_custom_command( 11+ TARGET swift-frontend-bootstrapping0 POST_BUILD 12+ COMMAND nix-swift-make-swift-wrapper $<TARGET_FILE:swift-frontend-bootstrapping0> 13+ VERBATIM 14+ ) 15+ 16 swift_create_post_build_symlink(swift-frontend-bootstrapping0 17 SOURCE "swift-frontend${CMAKE_EXECUTABLE_SUFFIX}" 18 DESTINATION "swiftc${CMAKE_EXECUTABLE_SUFFIX}" 19@@ -34,6 +41,13 @@ if(${LIBSWIFT_BUILD_MODE} MATCHES "BOOTSTRAPPING.*") 20 swiftDriverTool 21 libswift-bootstrapping1) 22 23+ # Nix: wrap the swift build. 24+ add_custom_command( 25+ TARGET swift-frontend-bootstrapping1 POST_BUILD 26+ COMMAND nix-swift-make-swift-wrapper $<TARGET_FILE:swift-frontend-bootstrapping1> 27+ VERBATIM 28+ ) 29+ 30 swift_create_post_build_symlink(swift-frontend-bootstrapping1 31 SOURCE "swift-frontend${CMAKE_EXECUTABLE_SUFFIX}" 32 DESTINATION "swiftc${CMAKE_EXECUTABLE_SUFFIX}" 33@@ -50,6 +64,13 @@ target_link_libraries(swift-frontend 34 swiftDriverTool 35 libswift) 36 37+# Nix: wrap the swift build. 38+add_custom_command( 39+ TARGET swift-frontend POST_BUILD 40+ COMMAND nix-swift-make-swift-wrapper $<TARGET_FILE:swift-frontend> 41+ VERBATIM 42+) 43+ 44 # Create a `swift-driver` executable adjacent to the `swift-frontend` executable 45 # to ensure that `swiftc` forwards to the standalone driver when invoked. 46 swift_create_early_driver_copies(swift-frontend)