File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -263,10 +263,7 @@ extension Triple {
263
263
case . wasi:
264
264
return " .wasm "
265
265
case . noneOS:
266
- // Better as dynamic error or "fatalError", but it is a larger
267
- // undertaking to teach spm that dylibs are not available on some
268
- // platforms.
269
- return " .os-none-dynamic-library "
266
+ fatalError ( " Cannot create dynamic libraries for os \" none \" . " )
270
267
}
271
268
}
272
269
Original file line number Diff line number Diff line change @@ -394,15 +394,16 @@ public struct BuildParameters: Encodable {
394
394
/// Returns the path to the binary of a product for the current build parameters, relative to the build directory.
395
395
public func binaryRelativePath( for product: ResolvedProduct ) -> RelativePath {
396
396
let potentialExecutablePath = RelativePath ( " \( product. name) \( triple. executableExtension) " )
397
- let potentialLibraryPath = RelativePath ( " \( triple. dynamicLibraryPrefix) \( product. name) \( triple. dynamicLibraryExtension) " )
397
+ func potentialLibraryPath( ) -> RelativePath { RelativePath ( " \( triple. dynamicLibraryPrefix) \( product. name) \( triple. dynamicLibraryExtension) " )
398
+ }
398
399
399
400
switch product. type {
400
401
case . executable, . snippet:
401
402
return potentialExecutablePath
402
403
case . library( . static) :
403
404
return RelativePath ( " lib \( product. name) \( triple. staticLibraryExtension) " )
404
405
case . library( . dynamic) :
405
- return potentialLibraryPath
406
+ return potentialLibraryPath ( )
406
407
case . library( . automatic) , . plugin:
407
408
fatalError ( )
408
409
case . test:
@@ -418,7 +419,7 @@ public struct BuildParameters: Encodable {
418
419
}
419
420
case . macro:
420
421
#if BUILD_MACROS_AS_DYLIBS
421
- return potentialLibraryPath
422
+ return potentialLibraryPath ( )
422
423
#else
423
424
return potentialExecutablePath
424
425
#endif
You can’t perform that action at this time.
0 commit comments