Skip to content

Commit

Permalink
Only request per_object_debug_info when fission is enabled.
Browse files Browse the repository at this point in the history
This allows CROSSTOOL authors to add flags to all targets for which fission
is enabled, even when a compile action does not output split debug info.

For example, when building with ThinLTO, compiles are split into a frontend
compile, that does not generate split debug info, but still needs to include
debug info if fission is enabled (even in opt mode).

RELNOTES: None.
PiperOrigin-RevId: 163825563
  • Loading branch information
r4nt authored and dslomov committed Aug 1, 2017
1 parent b05ed43 commit 57d3e95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public void collectMetadataArtifacts(Iterable<Artifact> objectFiles,
CppRuleClasses.HEADER_MODULE_COMPILE,
CppRuleClasses.INCLUDE_PATHS,
CppRuleClasses.PIC,
CppRuleClasses.PER_OBJECT_DEBUG_INFO,
CppRuleClasses.PREPROCESSOR_DEFINES);
public static final String CC_TOOLCHAIN_DEFAULT_ATTRIBUTE_NAME = ":cc_toolchain";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1937,6 +1937,9 @@ public ImmutableSet<String> configurationEnabledFeatures(RuleContext ruleContext
requestedFeatures.add(CppRuleClasses.GCC_COVERAGE_MAP_FORMAT);
}
}
if (useFission()) {
requestedFeatures.add(CppRuleClasses.PER_OBJECT_DEBUG_INFO);
}
return requestedFeatures.build();
}

Expand Down

0 comments on commit 57d3e95

Please sign in to comment.