@@ -69,13 +69,12 @@ def test(self, sandbox_profile, stdout=sys.stdout, stderr=sys.stderr,
6969class XcodeTarget (ProjectTarget ):
7070 """An Xcode workspace scheme."""
7171
72- def __init__ (self , swiftc , project , target , destination , sdk ,
72+ def __init__ (self , swiftc , project , target , destination ,
7373 added_xcodebuild_flags , is_workspace , has_scheme ):
7474 self ._swiftc = swiftc
7575 self ._project = project
7676 self ._target = target
7777 self ._destination = destination
78- self ._sdk = sdk
7978 self ._added_xcodebuild_flags = added_xcodebuild_flags
8079 self ._is_workspace = is_workspace
8180 self ._has_scheme = has_scheme
@@ -111,8 +110,7 @@ def get_build_command(self, incremental=False):
111110 target_param , self ._target ,
112111 '-destination' , self ._destination ]
113112 + dir_override
114- + ['-sdk' , self ._sdk ,
115- 'CODE_SIGN_IDENTITY=' ,
113+ + ['CODE_SIGN_IDENTITY=' ,
116114 'CODE_SIGNING_REQUIRED=NO' ,
117115 'ENABLE_BITCODE=NO' ,
118116 'INDEX_ENABLE_DATA_STORE=NO' ,
@@ -133,7 +131,6 @@ def get_test_command(self, incremental=False):
133131 + [project_param , self ._project ,
134132 target_param , self ._target ,
135133 '-destination' , self ._destination ,
136- '-sdk' , self ._sdk ,
137134 # TODO: stdlib search code
138135 'SWIFT_LIBRARY_PATH=%s' %
139136 get_stdlib_platform_path (
@@ -165,28 +162,6 @@ def get_stdlib_platform_path(swiftc, destination):
165162 return stdlib_path
166163
167164
168- def get_sdk_platform_path (destination , stdout = sys .stdout , stderr = sys .stderr ):
169- """Return the corresponding sdk path for a destination."""
170- platform_sdk_path = {
171- 'Xcode' : 'macosx' ,
172- 'macOS' : 'macosx' ,
173- 'iOS' : 'iphoneos' ,
174- 'tvOS' : 'appletvos' ,
175- 'watchOS' : 'watchos' ,
176- }
177- sdk_dir = None
178- for platform_key in platform_sdk_path :
179- if platform_key in destination :
180- sdk_dir = common .check_execute_output ([
181- '/usr/bin/xcrun' ,
182- '-show-sdk-path' ,
183- '-sdk' , platform_sdk_path [platform_key ]
184- ], stdout = stdout , stderr = stderr ).strip ()
185- break
186- assert sdk_dir , 'Unable to find SDK'
187- return sdk_dir
188-
189-
190165def clean_swift_package (path , swiftc , sandbox_profile ,
191166 stdout = sys .stdout , stderr = sys .stderr ):
192167 """Clean a Swift package manager project."""
@@ -349,8 +324,6 @@ def dispatch(root_path, repo, action, swiftc, swift_version,
349324 project_path ,
350325 action [match .group (3 ).lower ()],
351326 action ['destination' ],
352- get_sdk_platform_path (action ['destination' ],
353- stdout = stdout , stderr = stderr ),
354327 initial_xcodebuild_flags + added_xcodebuild_flags ,
355328 is_workspace ,
356329 has_scheme )
0 commit comments