You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to write a toolchain that supports --start-lib, my first attempt at trying to enable this feature was to apply that option to my linker because of this example:
File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/9f9228df1e3a30aece838a611f14f344/external/rules_cc~/cc/toolchains/impl/toolchain_config.bzl", line 54, column 45, in _cc_toolchain_config_impl
toolchain_config = toolchain_config_info(
File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/9f9228df1e3a30aece838a611f14f344/external/rules_cc~/cc/toolchains/impl/toolchain_config_info.bzl", line 183, column 24, in toolchain_config_info
_validate_toolchain(toolchain_config, fail = fail)
File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/9f9228df1e3a30aece838a611f14f344/external/rules_cc~/cc/toolchains/impl/toolchain_config_info.bzl", line 119, column 41, in _validate_toolchain
known_features = _get_known_features(self.features, capabilities, fail = fail)
File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/9f9228df1e3a30aece838a611f14f344/external/rules_cc~/cc/toolchains/impl/toolchain_config_info.bzl", line 63, column 21, in _get_known_features
fail(_FEATURE_NAME_ERR.format(
Error in fail: The feature name supports_start_end_lib was defined by both @@rules_cc~//cc/toolchains/capabilities:supports_start_end_lib and @@rules_cc~//cc/toolchains/capabilities:supports_start_end_lib.
I'm still not sure how this is supposed to work today, but I was able to hack around this by adding a custom feature to enabled features:
When trying to write a toolchain that supports --start-lib, my first attempt at trying to enable this feature was to apply that option to my linker because of this example:
rules_cc/cc/toolchains/tool.bzl
Lines 126 to 133 in 96d7d59
doing this:
results in this error:
I'm still not sure how this is supposed to work today, but I was able to hack around this by adding a custom feature to enabled features:
The text was updated successfully, but these errors were encountered: