From 92b727ede6af6a09ec4977c4ea5257c3357a5986 Mon Sep 17 00:00:00 2001 From: Tony Allevato Date: Wed, 9 Jun 2021 07:29:51 -0700 Subject: [PATCH] Remove the `-rpath` for the Xcode's developer frameworks directory from the Swift toolchain. It may have been needed in the past with older versions of Swift, but it doesn't appear to be anymore (and it causes problems if the version targeted during the build is mismatched with the simulator/OS version under which the test is running). PiperOrigin-RevId: 378400910 --- swift/internal/xcode_swift_toolchain.bzl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/swift/internal/xcode_swift_toolchain.bzl b/swift/internal/xcode_swift_toolchain.bzl index 5ced14094..503de26b6 100644 --- a/swift/internal/xcode_swift_toolchain.bzl +++ b/swift/internal/xcode_swift_toolchain.bzl @@ -237,15 +237,10 @@ def _swift_linkopts_providers( "-Wl,-objc_abi_version,2", ] - # Frameworks in the platform's developer frameworks directory (like XCTest, - # but also StoreKitTest on macOS) contain the actual binary for that - # framework, not a .tbd file that says where to find it on simulator/device. - # So, we need to explicitly add that to test binaries' rpaths. We also need - # to add the linker path to the directory containing the dylib with Swift + # Add the linker path to the directory containing the dylib with Swift # extensions for the XCTest module. if platform_developer_framework_dir: linkopts.extend([ - "-Wl,-rpath,{}".format(platform_developer_framework_dir), "-L{}".format( _swift_developer_lib_dir(platform_developer_framework_dir), ),