Provide .pcm files as input to LIPO builds.
Previously, bazel would be internally inconsistent regarding whether it thought
module files were in use for LIPO builds. The merged CppCompilationContext
would not list .pcm files as inputs, because its useHeaderModules flag was
forced to false, but the CppModel would expand %module_file to a list of
.pcm files, because it thought that modules were in use. This results in
LIPO build failures due to missing files.
RELNOTES:
Fix interaction between LIPO builds and C++ header modules.
--
MOS_MIGRATED_REVID=121513092
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompilationContext.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompilationContext.java
index e46452f..691deb8 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompilationContext.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompilationContext.java
@@ -449,8 +449,8 @@
libContext.cppModuleMap,
libContext.headerModule,
libContext.picHeaderModule,
- /*providesTransitiveModuleMaps=*/ false,
- /*useHeaderModules=*/ false);
+ libContext.provideTransitiveModuleMaps,
+ libContext.useHeaderModules);
}
/**