aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Meumertzheim <meumertzheim@code-intelligence.com>2022-08-02 18:00:16 +0200
committerFabian Meumertzheim <fabian@meumertzhe.im>2022-08-05 08:47:39 +0200
commit3782163e81c8887ad1d9f77d0ddf0eade4d19aa5 (patch)
tree47f6af8150c74f3086be1e7a3b99b1b216292b92
parent785efb7238bc9f10778c96c2348e579d3d01525d (diff)
downloadjazzer-api-3782163e81c8887ad1d9f77d0ddf0eade4d19aa5.tar.gz
bazel: Make cc_17_library work with CLion aspect
By calling the attribute of cc_17_library `exports` instead of `library`, the CLion aspect picks it up without additional effort. See https://github.com/fmeum/rules_meta/commit/8d57be3cba03d68abbebcf9b774d4167feae0e0e
-rw-r--r--bazel/cc.bzl6
1 files changed, 3 insertions, 3 deletions
diff --git a/bazel/cc.bzl b/bazel/cc.bzl
index 1fab30cd..8cd1c8b2 100644
--- a/bazel/cc.bzl
+++ b/bazel/cc.bzl
@@ -29,7 +29,7 @@ _add_cxxopt_std_17 = transition(
)
def _cc_17_library_impl(ctx):
- library = ctx.attr.library[0]
+ library = ctx.attr.exports[0]
return [
# Workaround for https://github.com/bazelbuild/bazel/issues/9442.
DefaultInfo(
@@ -48,7 +48,7 @@ _cc_17_library = rule(
implementation = _cc_17_library_impl,
attrs = {
"is_windows": attr.bool(),
- "library": attr.label(
+ "exports": attr.label(
cfg = _add_cxxopt_std_17,
mandatory = True,
providers = [CcInfo],
@@ -79,6 +79,6 @@ def cc_17_library(name, visibility = None, **kwargs):
"@platforms//os:windows": True,
"//conditions:default": False,
}),
- library = library_name,
+ exports = library_name,
visibility = visibility,
)