@@ -310,14 +310,12 @@ def _swift_linkopts_cc_info(
310310 )
311311
312312def _test_linking_context (
313- apple_toolchain ,
314313 target_triple ,
315314 toolchain_label ,
316315 xcode_config ):
317316 """Returns a `CcLinkingContext` containing linker flags for test binaries.
318317
319318 Args:
320- apple_toolchain: The `apple_common.apple_toolchain()` object.
321319 target_triple: The target triple `struct`.
322320 toolchain_label: The label of the Swift toolchain that will act as the
323321 owner of the linker input propagating the flags.
@@ -327,10 +325,6 @@ def _test_linking_context(
327325 A `CcLinkingContext` that will provide linker flags to `swift_test`
328326 binaries.
329327 """
330- platform_developer_framework_dir = _platform_developer_framework_dir (
331- apple_toolchain ,
332- target_triple ,
333- )
334328
335329 # Weakly link to XCTest. It's possible that machine that links the test
336330 # binary will have Xcode installed at a different path than the machine that
@@ -343,19 +337,6 @@ def _test_linking_context(
343337 if _is_xcode_at_least_version (xcode_config , "16.0" ):
344338 linkopts .append ("-Wl,-weak_framework,Testing" )
345339
346- if platform_developer_framework_dir :
347- linkopts .extend ([
348- "-F{}" .format (platform_developer_framework_dir ),
349- "-L{}" .format (
350- swift_developer_lib_dir ([
351- struct (
352- developer_path_label = "platform" ,
353- path = platform_developer_framework_dir ,
354- ),
355- ]),
356- ),
357- ])
358-
359340 # We use these as the rpaths for linking tests so that the required
360341 # libraries are found if Xcode is installed in a different location on the
361342 # machine that runs the tests than the machine used to link them.
@@ -773,7 +754,6 @@ def _xcode_swift_toolchain_impl(ctx):
773754 swiftcopts .extend (ctx .attr ._copts [BuildSettingInfo ].value )
774755
775756 test_linking_context = _test_linking_context (
776- apple_toolchain = apple_toolchain ,
777757 target_triple = target_triple ,
778758 toolchain_label = ctx .label ,
779759 xcode_config = xcode_config ,
0 commit comments