From f26b0ff7269a9440d5c32d32a023f62de6fdbb68 Mon Sep 17 00:00:00 2001 From: waltl Date: Tue, 26 Nov 2019 23:05:16 -0800 Subject: [PATCH] Don't do validate inclusions check on objc module maps RELNOTES: None PiperOrigin-RevId: 282706702 --- .../devtools/build/lib/rules/cpp/CppCompileAction.java | 5 +++++ .../google/devtools/build/lib/rules/cpp/CppFileTypes.java | 1 + 2 files changed, 6 insertions(+) diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java index 11987d3ebcbd3c..84e74d20839707 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java @@ -973,6 +973,11 @@ public void validateInclusions( if (input.isFileType(CppFileTypes.CPP_MODULE)) { continue; } + // TODO(b/145253507): Exclude objc module maps from check, due to bad interaction with + // local_objc_modules feature. + if (input.isFileType(CppFileTypes.OBJC_MODULE_MAP)) { + continue; + } if (allowedIncludes.contains(input)) { continue; } diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java index b1e287c194bac5..81cdb3a371d897 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java @@ -199,6 +199,7 @@ public boolean apply(String path) { public static final FileType CPP_MODULE_MAP = FileType.of(".cppmap"); public static final FileType CPP_MODULE = FileType.of(".pcm"); + public static final FileType OBJC_MODULE_MAP = FileType.of("module.modulemap"); /** Predicate that matches all artifacts that can be used in an objc Clang module map. */ public static final Predicate MODULE_MAP_HEADER =