diff --git a/examples/my_c_archive/my_c_archive.bzl b/examples/my_c_archive/my_c_archive.bzl index bdb1c0e..30b313e 100644 --- a/examples/my_c_archive/my_c_archive.bzl +++ b/examples/my_c_archive/my_c_archive.bzl @@ -24,6 +24,7 @@ def _my_c_archive_impl(ctx): output_file = ctx.actions.declare_file(ctx.label.name + ".a") feature_configuration = cc_common.configure_features( + ctx = ctx, cc_toolchain = cc_toolchain, requested_features = ctx.features, unsupported_features = ctx.disabled_features, @@ -90,4 +91,5 @@ my_c_archive = rule( "deps": attr.label_list(providers = [CcInfo]), "_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")), }, + fragments = ["cpp"], ) diff --git a/examples/my_c_compile/my_c_compile.bzl b/examples/my_c_compile/my_c_compile.bzl index 9892dc6..6e35b39 100644 --- a/examples/my_c_compile/my_c_compile.bzl +++ b/examples/my_c_compile/my_c_compile.bzl @@ -28,6 +28,7 @@ def _my_c_compile_impl(ctx): source_file = ctx.file.src output_file = ctx.actions.declare_file(ctx.label.name + ".o") feature_configuration = cc_common.configure_features( + ctx = ctx, cc_toolchain = cc_toolchain, requested_features = ctx.features, unsupported_features = DISABLED_FEATURES + ctx.disabled_features,