Skip to content

Commit

Permalink
Correct header thinning in ObjC crosstool rules so that objc_framework
Browse files Browse the repository at this point in the history
imports can be discovered.

--
PiperOrigin-RevId: 150882114
MOS_MIGRATED_REVID=150882114
  • Loading branch information
Googler authored and hermione521 committed Mar 23, 2017
1 parent 1a09e7e commit 1375431
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,14 @@ CompilationSupport registerLinkActions(
}

private IncludeProcessing createIncludeProcessing(
Iterable<Artifact> potentialInputs, @Nullable Artifact pchHdr) {
Iterable<Artifact> privateHdrs, ObjcProvider objcProvider, @Nullable Artifact pchHdr) {
if (isHeaderThinningEnabled()) {
Iterable<Artifact> potentialInputs =
Iterables.concat(
privateHdrs,
objcProvider.get(HEADER),
objcProvider.get(STATIC_FRAMEWORK_FILE),
objcProvider.get(DYNAMIC_FRAMEWORK_FILE));
if (pchHdr != null) {
potentialInputs = Iterables.concat(potentialInputs, ImmutableList.of(pchHdr));
}
Expand Down Expand Up @@ -305,8 +311,7 @@ private CcLibraryHelper createCcLibraryHelper(
ObjcCppSemantics semantics =
new ObjcCppSemantics(
objcProvider,
createIncludeProcessing(
Iterables.concat(privateHdrs, publicHdrs, objcProvider.get(HEADER)), pchHdr),
createIncludeProcessing(privateHdrs, objcProvider, pchHdr),
ruleContext.getFragment(ObjcConfiguration.class),
isHeaderThinningEnabled(),
intermediateArtifacts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private static Artifact findRequiredHeaderInputInTreeArtifacts(
throw new UserExecException(
String.format(
"Unable to map header file (%s) found during header scanning of %s."
+ " This is usually the result of a case mismatch.",
+ " This is usually the result of a case mismatch",
missingPath, sourceFile.getExecPathString()));
}
}

0 comments on commit 1375431

Please sign in to comment.