@@ -350,8 +350,13 @@ package final class SwiftCommandState {
350350 fileSystem: fileSystem
351351 )
352352 self . sharedCacheDirectory = try getSharedCacheDirectory ( options: options, fileSystem: fileSystem)
353+ if options. locations. deprecatedSwiftSDKsDirectory != nil {
354+ self . observabilityScope. emit (
355+ warning: " `--experimental-swift-sdks-path` is deprecated and will be removed in a future version of SwiftPM. Use `--swift-sdks-path` instead. "
356+ )
357+ }
353358 self . sharedSwiftSDKsDirectory = try fileSystem. getSharedSwiftSDKsDirectory (
354- explicitDirectory: options. locations. swiftSDKsDirectory
359+ explicitDirectory: options. locations. swiftSDKsDirectory ?? options . locations . deprecatedSwiftSDKsDirectory
355360 )
356361
357362 // set global process logging handler
@@ -820,14 +825,20 @@ package final class SwiftCommandState {
820825 do {
821826 let hostToolchain = try _hostToolchain. get ( )
822827 hostSwiftSDK = hostToolchain. swiftSDK
828+
829+ if options. build. deprecatedSwiftSDKSelector != nil {
830+ self . observabilityScope. emit (
831+ warning: " `--experimental-swift-sdk` is deprecated and will be removed in a future version of SwiftPM. Use `--swift-sdk` instead. "
832+ )
833+ }
823834 swiftSDK = try SwiftSDK . deriveTargetSwiftSDK (
824835 hostSwiftSDK: hostSwiftSDK,
825836 hostTriple: hostToolchain. targetTriple,
826837 customCompileDestination: options. locations. customCompileDestination,
827838 customCompileTriple: options. build. customCompileTriple,
828839 customCompileToolchain: options. build. customCompileToolchain,
829840 customCompileSDK: options. build. customCompileSDK,
830- swiftSDKSelector: options. build. swiftSDKSelector,
841+ swiftSDKSelector: options. build. swiftSDKSelector ?? options . build . deprecatedSwiftSDKSelector ,
831842 architectures: options. build. architectures,
832843 store: store,
833844 observabilityScope: self . observabilityScope,
0 commit comments