Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Remove the -rpath for the Xcode's developer frameworks directory fr…
Browse files Browse the repository at this point in the history
…om 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
  • Loading branch information
allevato authored and swiple-rules-gardener committed Jun 9, 2021
1 parent 96f0a67 commit 92b727e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions swift/internal/xcode_swift_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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),
),
Expand Down

0 comments on commit 92b727e

Please sign in to comment.