mirror of
https://github.com/bazelbuild/rules_cc
synced 2024-12-02 01:15:34 +00:00
8c31dd406c
Changes in this CL: 1. 'exports' attribute renamed to roots 2. Removed restrictions for exporting a rule in a different repository 3. Kept restrictions for rules in the same repository but not in the same package or subpackages 4. To get around restrictions, instead of the exported_by tag, one can use the cc_shared_library_permissions rule 5. Added exports_filter that will match libraries in the transitive closure of a root. Anything matched by the exports_filter will also be exported. Restrictions as in 4. still apply. RELNOTES:none PiperOrigin-RevId: 310547916 Change-Id: I32d8e0d4dd4bcc9c9e92f4ff3c5b2a01564c31b2
18 lines
449 B
Python
18 lines
449 B
Python
load("@rules_cc//cc:defs.bzl", "cc_library")
|
|
load("//examples:experimental_cc_shared_library.bzl", "cc_shared_library_permissions")
|
|
|
|
cc_library(
|
|
name = "bar",
|
|
srcs = ["bar.cc"],
|
|
hdrs = ["bar.h"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
cc_shared_library_permissions(
|
|
name = "permissions",
|
|
targets = [
|
|
"//examples/test_cc_shared_library3:bar",
|
|
],
|
|
visibility = ["//examples/test_cc_shared_library:__pkg__"],
|
|
)
|