From a258fa89e5b6f0a4605cedfa057e88b946c66838 Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 25 Mar 2015 21:08:36 +0000 Subject: [PATCH] Fixes the warnings that are generated by Xcode when building objc_library targets that have dylibs associated to them. -- MOS_MIGRATED_REVID=89536149 --- .../devtools/build/xcode/xcodegen/XcodeprojGeneration.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/objc_tools/xcodegen/java/com/google/devtools/build/xcode/xcodegen/XcodeprojGeneration.java b/src/objc_tools/xcodegen/java/com/google/devtools/build/xcode/xcodegen/XcodeprojGeneration.java index 7a12dfe6071075..64ba01fb996fe4 100644 --- a/src/objc_tools/xcodegen/java/com/google/devtools/build/xcode/xcodegen/XcodeprojGeneration.java +++ b/src/objc_tools/xcodegen/java/com/google/devtools/build/xcode/xcodegen/XcodeprojGeneration.java @@ -331,8 +331,10 @@ private static NSArray frameworkSearchPaths(Iterable frameworks) { private static PBXFrameworksBuildPhase buildLibraryInfo( LibraryObjects libraryObjects, TargetControl target) { BuildPhaseBuilder builder = libraryObjects.newBuildPhase(); - for (String dylib : target.getSdkDylibList()) { - builder.addDylib(dylib); + if (Containing.item(PRODUCT_TYPES_THAT_HAVE_A_BINARY, productType(target))) { + for (String dylib : target.getSdkDylibList()) { + builder.addDylib(dylib); + } } for (String sdkFramework : target.getSdkFrameworkList()) { builder.addSdkFramework(sdkFramework);