Skip to content

Commit 4d4fc07

Browse files
AustinSchuhcopybara-github
authored andcommitted
Deduplicate capability features
Copybara Import from #344 BEGIN_PUBLIC Deduplicate capability features (#344) Under the covers, features are used to communicate tool capabilities to the underlying code. If multiple tools provide the same capabilities, this ends up generating duplicate features and failing. C++ and C tools is a really easy example, and they both have "supports_dynamic_linker" as a capability very reasonably. Closes #344 END_PUBLIC COPYBARA_INTEGRATE_REVIEW=#344 from AustinSchuh:dedup_capabilities 74bc316 PiperOrigin-RevId: 782686204 Change-Id: Ic3575c8e2f873d8161812da508161ed485672135
1 parent 85221b1 commit 4d4fc07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cc/toolchains/impl/toolchain_config_info.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def _validate_feature(self, known_features, fail):
119119
def _validate_toolchain(self, fail = fail):
120120
capabilities = []
121121
for tool in self.tool_map.configs.values():
122-
capabilities.extend([cap.feature for cap in tool.capabilities])
122+
capabilities.extend([cap.feature for cap in tool.capabilities if cap.feature not in capabilities])
123123
known_features = _get_known_features(self.features, capabilities, fail = fail)
124124

125125
for feature in self.features:

0 commit comments

Comments
 (0)