From e836c3e89890aaa9582a1e89c0300e6b489a0626 Mon Sep 17 00:00:00 2001 From: Googler Date: Mon, 15 Apr 2019 03:41:36 -0700 Subject: [PATCH] Add ctx argument to cc_common.configure_features In order to migrate C++ rules to platforms, we need the access to the C++ configuration fragment in Starlark APIs. All existing APIs have already access to it, but cc_common.configure_features doesn't. This change adds a ctx argument to configure_features. This is the migration needed for https://github.com/bazelbuild/bazel/issues/7793, and is part of the effort for https://github.com/bazelbuild/bazel/issues/6516. If the rule doesn't depend on cpp fragment yet, you will have to add `fragments =['cpp']` argument to the rule() call. Note that this behavior is only available in Bazel 0.25 (to be released this month). RELNOTES: None. PiperOrigin-RevId: 243587074 --- aspect/intellij_info_impl.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/aspect/intellij_info_impl.bzl b/aspect/intellij_info_impl.bzl index 1a266660053..a8f1c36019d 100644 --- a/aspect/intellij_info_impl.bzl +++ b/aspect/intellij_info_impl.bzl @@ -455,6 +455,7 @@ def collect_c_toolchain_info(target, ctx, semantics, ide_info, ide_info_file, ou cxxopts = [] conlyopts = [] feature_configuration = cc_common.configure_features( + ctx = ctx, cc_toolchain = cpp_toolchain, requested_features = ctx.features, unsupported_features = ctx.disabled_features + UNSUPPORTED_FEATURES,