@@ -207,7 +207,7 @@ endfunction()
207
207
# Once swift-frontend is built, if the standalone (early) swift-driver has been built,
208
208
# we create a `swift-driver` symlink adjacent to the `swift` and `swiftc` executables
209
209
# to ensure that `swiftc` forwards to the standalone driver when invoked.
210
- function (swift_create_early_driver_symlinks target )
210
+ function (swift_create_early_driver_copies target )
211
211
# Early swift-driver is built adjacent to the compiler (swift build dir)
212
212
set (driver_bin_dir "${CMAKE_BINARY_DIR} /../earlyswiftdriver-${SWIFT_HOST_VARIANT} -${SWIFT_HOST_VARIANT_ARCH} /release/bin" )
213
213
set (swift_bin_dir "${SWIFT_RUNTIME_OUTPUT_INTDIR} " )
@@ -217,20 +217,18 @@ function(swift_create_early_driver_symlinks target)
217
217
return ()
218
218
endif ()
219
219
220
- message (STATUS "Creating early SwiftDriver symlinks ." )
220
+ message (STATUS "Copying over early SwiftDriver executable ." )
221
221
message (STATUS "From: ${driver_bin_dir} /swift-driver" )
222
222
message (STATUS "To: ${swift_bin_dir} /swift-driver" )
223
- swift_create_post_build_symlink (swift-frontend
224
- SOURCE "${driver_bin_dir} /swift-driver"
225
- DESTINATION "${swift_bin_dir} /swift-driver"
226
- COMMENT "Creating early SwiftDriver symlinks: swift-driver" )
223
+ # Use configure_file instead of file(COPY...) to establish a dependency.
224
+ # Further Changes to `swift-driver` will cause it to be copied over.
225
+ configure_file (${driver_bin_dir} /swift-driver ${swift_bin_dir} /swift-driver COPYONLY )
227
226
228
227
message (STATUS "From: ${driver_bin_dir} /swift-help" )
229
228
message (STATUS "To: ${swift_bin_dir} /swift-help" )
230
- swift_create_post_build_symlink (swift-frontend
231
- SOURCE "${driver_bin_dir} /swift-help"
232
- DESTINATION "${swift_bin_dir} /swift-help"
233
- COMMENT "Creating early SwiftDriver symlinks: swift-help" )
229
+ # Use configure_file instead of file(COPY...) to establish a dependency.
230
+ # Further Changes to `swift-driver` will cause it to be copied over.
231
+ configure_file (${driver_bin_dir} /swift-help ${swift_bin_dir} /swift-help COPYONLY )
234
232
endfunction ()
235
233
236
234
function (dump_swift_vars )
0 commit comments