+ case ld::File::objcConstraintRetainReleaseForSimulator:
+ if ( _internal.objcDylibConstraint == ld::File::objcConstraintNone )
+ _internal.objcDylibConstraint = ld::File::objcConstraintRetainReleaseForSimulator;
+ else if ( _internal.objcDylibConstraint != ld::File::objcConstraintRetainReleaseForSimulator ) {
+ warning("ObjC dylib (%s) was compiled for iOS Simulator, but dylibs others were compiled for MacOSX", file.path());
+ _internal.objcDylibConstraint = ld::File::objcConstraintRetainReleaseForSimulator;
+ }
+ break;
+ }
+ if ( _options.checkDylibsAreAppExtensionSafe() && !dylibFile->appExtensionSafe() ) {
+ warning("linking against dylib not safe for use in application extensions: %s", file.path());
+ }
+ const char* depInstallName = dylibFile->installPath();
+ // <rdar://problem/17229513> embedded frameworks are only supported on iOS 8 and later
+ if ( (depInstallName != NULL) && (depInstallName[0] != '/') ) {
+ if ( (_options.iOSVersionMin() != iOSVersionUnset) && (_options.iOSVersionMin() < iOS_8_0) ) {
+ // <rdar://problem/17598404> only warn about linking against embedded dylib if it is built for iOS 8 or later
+ if ( dylibFile->iOSMinVersion() >= iOS_8_0 )
+ throwf("embedded dylibs/frameworks are only supported on iOS 8.0 and later (%s)", depInstallName);
+ }
+ }
+ if ( _options.sharedRegionEligible() ) {
+ assert(depInstallName != NULL);
+ if ( depInstallName[0] == '@' )
+ warning("invalid -install_name (%s) in dependent dylib (%s). Dylibs/frameworks which might go in dyld shared cache "
+ "cannot link with dylib that uses @rpath, @loaderpath, etc.", depInstallName, dylibFile->path());
+ if ( (strncmp(depInstallName, "/usr/lib/", 9) != 0) && (strncmp(depInstallName, "/System/Library/", 16) != 0) )
+ warning("invalid -install_name (%s) in dependent dylib (%s). Dylibs/frameworks which might go in dyld shared cache "
+ "cannot link with dylibs that won't be in the shared cache", depInstallName, dylibFile->path());