Adds to the list rpath for AppleBinary in loadable_bundle mode.
MOS_MIGRATED_REVID=146433179
@@ -198,8 +198,8 @@ public class AppleBinary implements RuleConfiguredTargetFactory {
ruleContext.getPrerequisite(
BUNDLE_LOADER_ATTR_NAME, Mode.TARGET, AppleExecutableBinaryProvider.class);
extraLinkArgs.add(
- "-bundle_loader "
- + executableProvider.getAppleExecutableBinary().getExecPathString());
+ "-bundle_loader", executableProvider.getAppleExecutableBinary().getExecPathString());
+ extraLinkArgs.add("-Xlinker", "-rpath", "-Xlinker", "@loader_path/Frameworks");
}
break;
case DYLIB:
@@ -254,8 +254,8 @@ public class AppleBinary implements RuleConfiguredTargetFactory {
// values of this rule -- this rule does not currently use the actual info provided by
// this attribute. b/28403953 tracks cc toolchain usage.
ImmutableListMultimap<BuildConfiguration, CcToolchainProvider> configToProvider =
- ruleContext.getPrerequisitesByConfiguration(ObjcRuleClasses.CHILD_CONFIG_ATTR, Mode.SPLIT,
- CcToolchainProvider.class);
+ ruleContext.getPrerequisitesByConfiguration(
+ ObjcRuleClasses.CHILD_CONFIG_ATTR, Mode.SPLIT, CcToolchainProvider.class);
return configToProvider.keySet();
}
