diff options
author | 2017-01-26 23:26:33 +0000 | |
---|---|---|
committer | 2017-01-27 10:12:51 +0000 | |
commit | 53bdf50187fe3f840117b36c3f899bdcea72cda5 (patch) | |
tree | 1f5e782bcf6b94e8927fe1f502fb5ed52da0762e /src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java | |
parent | 3632f30b8fd24ad67510deaebddd64e973349157 (diff) |
Add a flag that alters the behavior of the parse_headers feature. With the
flag, the headers of a target are compiled into a C++ module instead of being
parsed as their own translation unit. The module otherwise remains unused.
This way, parse_headers can be used to get a codebase ready for C++ modules.
parse_headers currently already gets close, but there are still ways in which a
header can be modules-incompatible although it parses fine.
--
PiperOrigin-RevId: 145729231
MOS_MIGRATED_REVID=145729231
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java index 7cc659e1b5..1c7d0d1e99 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java @@ -76,19 +76,19 @@ public final class CcCommon { } }; - /** - * Features we request to enable unless a rule explicitly doesn't support them. - */ - private static final ImmutableSet<String> DEFAULT_FEATURES = ImmutableSet.of( - CppRuleClasses.DEPENDENCY_FILE, - CppRuleClasses.COMPILE_ACTION_FLAGS_IN_FLAG_SET, - CppRuleClasses.RANDOM_SEED, - CppRuleClasses.MODULE_MAPS, - CppRuleClasses.MODULE_MAP_HOME_CWD, - CppRuleClasses.INCLUDE_PATHS, - CppRuleClasses.PIC, - CppRuleClasses.PER_OBJECT_DEBUG_INFO, - CppRuleClasses.PREPROCESSOR_DEFINES); + /** Features we request to enable unless a rule explicitly doesn't support them. */ + private static final ImmutableSet<String> DEFAULT_FEATURES = + ImmutableSet.of( + CppRuleClasses.DEPENDENCY_FILE, + CppRuleClasses.COMPILE_ACTION_FLAGS_IN_FLAG_SET, + CppRuleClasses.RANDOM_SEED, + CppRuleClasses.MODULE_MAPS, + CppRuleClasses.MODULE_MAP_HOME_CWD, + CppRuleClasses.HEADER_MODULE_COMPILE, + CppRuleClasses.INCLUDE_PATHS, + CppRuleClasses.PIC, + CppRuleClasses.PER_OBJECT_DEBUG_INFO, + CppRuleClasses.PREPROCESSOR_DEFINES); /** C++ configuration */ private final CppConfiguration cppConfiguration; |