diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainRule.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainRule.java index 41ca8d19d032f9..761b944941e8ba 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainRule.java @@ -294,7 +294,11 @@ input discovery is supported (currently Google-only). /* Module map artifact to be used for modular builds. */ - .add(attr("module_map", LABEL).legacyAllowAnyFileType()) + .add( + attr("module_map", LABEL) + .legacyAllowAnyFileType() + // Should be in the target configuration + .cfg(NoTransition.createFactory())) /* Set to True when cc_toolchain supports using param files for linking actions. */