mirror of https://github.com/bazelbuild/rules_cc
Include more information about configurations in cquery proto formatted outout
1. Add a repeated Configuration field to CqueryResult, and fill in the checksum, platform, and mnemonic fields. 2. Add a configuration_id field to ConfiguredTarget, and deprecate the existing configuration field in ConfiguredTarget. The configuration_id field is an index that points to the Configuration message stored in CqueryResult, following the same pattern as ActionGraphContainer. This avoids duplicating the same Configuration message for each ConfiguredTarget. RELNOTES: Include more information about configurations in cquery proto formatted output. This deprecates the configuration field of AnalysisProtosV2.ConfiguredTarget, and adds a new field, configuration_id, to be used instead. PiperOrigin-RevId: 429129916 Change-Id: Id048229a6872e6462b67cfe3041cdc907967d7bf
This commit is contained in:
parent
081771d4a0
commit
c460f83acb
|
@ -1,10 +1,10 @@
|
||||||
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
|
load("//third_party/bazel_skylib:bzl_library.bzl", "bzl_library")
|
||||||
load("//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
|
load("//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
|
||||||
load("//examples:experimental_cc_shared_library.bzl", "LINKABLE_MORE_THAN_ONCE")
|
load("//third_party/bazel_rules/rules_cc/examples:experimental_cc_shared_library.bzl", "LINKABLE_MORE_THAN_ONCE")
|
||||||
load(":starlark_tests.bzl", "additional_inputs_test", "build_failure_test", "linking_suffix_test", "paths_test")
|
load(":starlark_tests.bzl", "additional_inputs_test", "build_failure_test", "linking_suffix_test", "paths_test")
|
||||||
|
|
||||||
package(
|
package(
|
||||||
default_visibility = ["//examples/test_cc_shared_library:__subpackages__"],
|
default_visibility = ["//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library:__subpackages__"],
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_test(
|
cc_test(
|
||||||
|
@ -45,8 +45,8 @@ cc_shared_library(
|
||||||
"a_suffix",
|
"a_suffix",
|
||||||
],
|
],
|
||||||
static_deps = [
|
static_deps = [
|
||||||
"//examples/test_cc_shared_library:qux",
|
"//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library:qux",
|
||||||
"//examples/test_cc_shared_library:qux2",
|
"//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library:qux2",
|
||||||
],
|
],
|
||||||
user_link_flags = [
|
user_link_flags = [
|
||||||
"-Wl,-rpath,kittens",
|
"-Wl,-rpath,kittens",
|
||||||
|
@ -108,10 +108,10 @@ cc_shared_library(
|
||||||
],
|
],
|
||||||
exports_filter = [
|
exports_filter = [
|
||||||
"bar3", # Exported transitive dependency
|
"bar3", # Exported transitive dependency
|
||||||
"//examples/test_cc_shared_library3:bar",
|
"//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library3:bar",
|
||||||
],
|
],
|
||||||
permissions = [
|
permissions = [
|
||||||
"//examples/test_cc_shared_library3:permissions",
|
"//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library3:permissions",
|
||||||
],
|
],
|
||||||
roots = [
|
roots = [
|
||||||
"bar",
|
"bar",
|
||||||
|
@ -119,9 +119,9 @@ cc_shared_library(
|
||||||
"@test_repo//:bar",
|
"@test_repo//:bar",
|
||||||
],
|
],
|
||||||
static_deps = [
|
static_deps = [
|
||||||
"//examples/test_cc_shared_library:barX",
|
"//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library:barX",
|
||||||
"@test_repo//:bar",
|
"@test_repo//:bar",
|
||||||
"//examples/test_cc_shared_library:qux2",
|
"//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library:qux2",
|
||||||
],
|
],
|
||||||
user_link_flags = [
|
user_link_flags = [
|
||||||
"-Wl,--version-script=$(location :bar.lds)",
|
"-Wl,--version-script=$(location :bar.lds)",
|
||||||
|
@ -159,7 +159,7 @@ cc_library(
|
||||||
srcs = ["bar3.cc"],
|
srcs = ["bar3.cc"],
|
||||||
hdrs = ["bar3.h"],
|
hdrs = ["bar3.h"],
|
||||||
deps = [
|
deps = [
|
||||||
"//examples/test_cc_shared_library3:bar",
|
"//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library3:bar",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -187,8 +187,8 @@ additional_inputs_test(
|
||||||
build_failure_test(
|
build_failure_test(
|
||||||
name = "link_once_repeated_test",
|
name = "link_once_repeated_test",
|
||||||
message = "already linked statically in " +
|
message = "already linked statically in " +
|
||||||
"//examples/test_cc_shared_library:foo_so but not exported.",
|
"//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library:foo_so but not exported.",
|
||||||
target_under_test = "//examples/test_cc_shared_library/failing_targets:should_fail_binary",
|
target_under_test = "//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library/failing_targets:should_fail_binary",
|
||||||
)
|
)
|
||||||
|
|
||||||
paths_test(
|
paths_test(
|
||||||
|
@ -198,13 +198,13 @@ paths_test(
|
||||||
build_failure_test(
|
build_failure_test(
|
||||||
name = "export_without_permissions_test",
|
name = "export_without_permissions_test",
|
||||||
message = "doesn't have the necessary permissions",
|
message = "doesn't have the necessary permissions",
|
||||||
target_under_test = "//examples/test_cc_shared_library/failing_targets:permissions_fail_so",
|
target_under_test = "//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library/failing_targets:permissions_fail_so",
|
||||||
)
|
)
|
||||||
|
|
||||||
build_failure_test(
|
build_failure_test(
|
||||||
name = "forbidden_target_permissions_test",
|
name = "forbidden_target_permissions_test",
|
||||||
message = "can only list targets that are in the same package or a sub-package",
|
message = "can only list targets that are in the same package or a sub-package",
|
||||||
target_under_test = "//examples/test_cc_shared_library/failing_targets:permissions_fail",
|
target_under_test = "//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library/failing_targets:permissions_fail",
|
||||||
)
|
)
|
||||||
|
|
||||||
bzl_library(
|
bzl_library(
|
||||||
|
@ -216,11 +216,11 @@ bzl_library(
|
||||||
cc_shared_library_permissions(
|
cc_shared_library_permissions(
|
||||||
name = "permissions",
|
name = "permissions",
|
||||||
targets = [
|
targets = [
|
||||||
"//examples/test_cc_shared_library:a_suffix",
|
"//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library:a_suffix",
|
||||||
"//examples/test_cc_shared_library:qux",
|
"//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library:qux",
|
||||||
"//examples/test_cc_shared_library:qux2",
|
"//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library:qux2",
|
||||||
],
|
],
|
||||||
visibility = ["//examples/test_cc_shared_library/diamond_inheritance:__pkg__"],
|
visibility = ["//third_party/bazel_rules/rules_cc/examples/test_cc_shared_library/diamond_inheritance:__pkg__"],
|
||||||
)
|
)
|
||||||
|
|
||||||
build_failure_test(
|
build_failure_test(
|
Loading…
Reference in New Issue