diff options
author | 2016-06-03 16:40:09 +0000 | |
---|---|---|
committer | 2016-06-06 08:02:06 +0000 | |
commit | 6d07acbfb9a45e58d9f2dcc95758cb9add1ad2b5 (patch) | |
tree | de901eba80169186e1e57c80b47b5ca2aebd3c6a /src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java | |
parent | bba483fe11cfd3f05e88caec8e7263dba33e2358 (diff) |
Add @loader_path to -rpath for xctest targets.
This fixes test timeouts when the app tested is using Swift. In theory this also prevents similar problems with any code that uses dynamic libs packaged in the IPA.
--
MOS_MIGRATED_REVID=123976581
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java index b4e7c855bb..7c49f81c0e 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java @@ -133,9 +133,12 @@ public final class IosTest implements RuleConfiguredTargetFactory { // -bundle_loader causes the code in this test to have access to the symbols in the test rig, // or more specifically, the flag causes ld to consider the given binary when checking for // missing symbols. + // -rpath @loader_path/Frameworks allows test bundles to load dylibs from the app's + // Frameworks directory. extraLinkArgs = new ExtraLinkArgs( "-bundle", - "-bundle_loader", bundleLoader.getExecPathString()); + "-bundle_loader", bundleLoader.getExecPathString(), + "-Xlinker", "-rpath", "-Xlinker", "@loader_path/Frameworks"); extraLinkInputs = ImmutableList.of(bundleLoader); bundleFormat = ReleaseBundlingSupport.XCTEST_BUNDLE_DIR_FORMAT; |