Refactor code for partitions c srcs

To support protos (and other srcs that generate sources), we need to
partition further. Separate out into a separate common function.

Bug: 200601772
Test: build/bazel/ci/bp2build.sh
Change-Id: I7bf4cd96fd9a9fca4ccb3c96f21a04303201f891
This commit is contained in:
Liz Kammer
2021-09-20 12:55:02 -04:00
parent 5b780b1ae2
commit 57e2e7a78f
6 changed files with 497 additions and 128 deletions

View File

@@ -580,7 +580,7 @@ cc_library {
"both_source.c",
"both_source.s",
"both_source.S",
":both_filegroup",
":both_filegroup",
],
static: {
srcs: [
@@ -633,9 +633,9 @@ filegroup {
local_includes = ["."],
shared = {
"srcs": [
":shared_filegroup_cpp_srcs",
"shared_source.cc",
"shared_source.cpp",
"shared_source.cc",
":shared_filegroup_cpp_srcs",
],
"srcs_as": [
"shared_source.s",
@@ -648,9 +648,9 @@ filegroup {
],
},
srcs = [
":both_filegroup_cpp_srcs",
"both_source.cc",
"both_source.cpp",
"both_source.cc",
":both_filegroup_cpp_srcs",
],
srcs_as = [
"both_source.s",
@@ -663,9 +663,9 @@ filegroup {
],
static = {
"srcs": [
":static_filegroup_cpp_srcs",
"static_source.cc",
"static_source.cpp",
"static_source.cc",
":static_filegroup_cpp_srcs",
],
"srcs_as": [
"static_source.s",