Skip to content

Commit

Permalink
Rollback of "Propagates cc_library linkopts attribute to dependent ob…
Browse files Browse the repository at this point in the history
…jc_libraries.": breaks certain objc_binary build targets.

--
MOS_MIGRATED_REVID=104146276
  • Loading branch information
c-parsons authored and fweikert committed Sep 30, 2015
1 parent a519903 commit 1ef338f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,6 @@ private CommandLine linkCommandLine(ExtraLinkArgs extraLinkArgs,
.addExecPaths(ccLibraries)
.addBeforeEach("-force_load", Artifact.toExecPaths(objcProvider.get(FORCE_LOAD_LIBRARY)))
.add(extraLinkArgs)
.add(objcProvider.get(ObjcProvider.LINKOPT))
.build();

if (ruleContext.getConfiguration().isCodeCoverageEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import static com.google.devtools.build.lib.rules.objc.ObjcProvider.INCLUDE_SYSTEM;
import static com.google.devtools.build.lib.rules.objc.ObjcProvider.LIBRARY;
import static com.google.devtools.build.lib.rules.objc.ObjcProvider.LINKED_BINARY;
import static com.google.devtools.build.lib.rules.objc.ObjcProvider.LINKOPT;
import static com.google.devtools.build.lib.rules.objc.ObjcProvider.MODULE_MAP;
import static com.google.devtools.build.lib.rules.objc.ObjcProvider.SDK_DYLIB;
import static com.google.devtools.build.lib.rules.objc.ObjcProvider.SDK_FRAMEWORK;
Expand All @@ -62,7 +61,6 @@
import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
import com.google.devtools.build.lib.packages.BuildType;
import com.google.devtools.build.lib.rules.cpp.CcCommon;
import com.google.devtools.build.lib.rules.cpp.CcLinkParams;
import com.google.devtools.build.lib.rules.cpp.CcLinkParamsProvider;
import com.google.devtools.build.lib.rules.cpp.CppCompilationContext;
import com.google.devtools.build.lib.rules.cpp.CppModuleMap;
Expand Down Expand Up @@ -475,10 +473,8 @@ ObjcCommon build() {
objcProvider.addAll(DEFINE, headerProvider.getDefines());
}
for (CcLinkParamsProvider linkProvider : depCcLinkProviders) {
CcLinkParams params = linkProvider.getCcLinkParams(true, false);
objcProvider
.addAll(LINKOPT, params.flattenedLinkopts())
.addTransitiveAndPropagate(CC_LIBRARY, params.getLibraries());
objcProvider.addTransitiveAndPropagate(
CC_LIBRARY, linkProvider.getCcLinkParams(true, false).getLibraries());
}

if (compilationAttributes.isPresent()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,6 @@ private Key(Order order) {
*/
public static final Key<LinkerInputs.LibraryToLink> CC_LIBRARY = new Key<>(LINK_ORDER);

/**
* Linking options from dependencies.
*/
public static final Key<String> LINKOPT = new Key<>(LINK_ORDER);

/**
* Flags that apply to a transitive build dependency tree. Each item in the enum corresponds to a
* flag. If the item is included in the key {@link #FLAG}, then the flag is considered set.
Expand Down

0 comments on commit 1ef338f

Please sign in to comment.