Merge "remove stub dependency on source_library" am: c02e7d4017
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2492376 Change-Id: Icf8945a946c7f8c27ce02510dade3d25a6be1a12 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1192,7 +1192,7 @@ apex {
|
|||||||
}),
|
}),
|
||||||
MakeBazelTarget("cc_stub_suite", "foo_stub_libs", AttrNameToString{
|
MakeBazelTarget("cc_stub_suite", "foo_stub_libs", AttrNameToString{
|
||||||
"soname": `"foo.so"`,
|
"soname": `"foo.so"`,
|
||||||
"source_library": `":foo"`,
|
"source_library_label": `"//:foo"`,
|
||||||
"symbol_file": `"foo.map.txt"`,
|
"symbol_file": `"foo.map.txt"`,
|
||||||
"versions": `[
|
"versions": `[
|
||||||
"28",
|
"28",
|
||||||
|
@@ -2781,7 +2781,7 @@ func TestCcLibraryStubs(t *testing.T) {
|
|||||||
})
|
})
|
||||||
expectedBazelTargets = append(expectedBazelTargets, makeCcStubSuiteTargets("a", AttrNameToString{
|
expectedBazelTargets = append(expectedBazelTargets, makeCcStubSuiteTargets("a", AttrNameToString{
|
||||||
"soname": `"a.so"`,
|
"soname": `"a.so"`,
|
||||||
"source_library": `":a"`,
|
"source_library_label": `"//foo/bar:a"`,
|
||||||
"stubs_symbol_file": `"a.map.txt"`,
|
"stubs_symbol_file": `"a.map.txt"`,
|
||||||
"stubs_versions": `[
|
"stubs_versions": `[
|
||||||
"28",
|
"28",
|
||||||
|
@@ -541,7 +541,7 @@ cc_library_shared {
|
|||||||
Blueprint: soongCcLibraryPreamble,
|
Blueprint: soongCcLibraryPreamble,
|
||||||
ExpectedBazelTargets: []string{makeCcStubSuiteTargets("a", AttrNameToString{
|
ExpectedBazelTargets: []string{makeCcStubSuiteTargets("a", AttrNameToString{
|
||||||
"soname": `"a.so"`,
|
"soname": `"a.so"`,
|
||||||
"source_library": `":a"`,
|
"source_library_label": `"//foo/bar:a"`,
|
||||||
"stubs_symbol_file": `"a.map.txt"`,
|
"stubs_symbol_file": `"a.map.txt"`,
|
||||||
"stubs_versions": `[
|
"stubs_versions": `[
|
||||||
"28",
|
"28",
|
||||||
|
@@ -626,13 +626,15 @@ func makeCcStubSuiteTargets(name string, attrs AttrNameToString) string {
|
|||||||
"stubs_symbol_file": "symbol_file",
|
"stubs_symbol_file": "symbol_file",
|
||||||
"stubs_versions": "versions",
|
"stubs_versions": "versions",
|
||||||
"soname": "soname",
|
"soname": "soname",
|
||||||
"source_library": "source_library",
|
"source_library_label": "source_library_label",
|
||||||
}
|
}
|
||||||
|
|
||||||
stubSuiteAttrs := AttrNameToString{}
|
stubSuiteAttrs := AttrNameToString{}
|
||||||
for key, _ := range attrs {
|
for key, _ := range attrs {
|
||||||
if _, stubSuiteAttr := STUB_SUITE_ATTRS[key]; stubSuiteAttr {
|
if _, stubSuiteAttr := STUB_SUITE_ATTRS[key]; stubSuiteAttr {
|
||||||
stubSuiteAttrs[STUB_SUITE_ATTRS[key]] = attrs[key]
|
stubSuiteAttrs[STUB_SUITE_ATTRS[key]] = attrs[key]
|
||||||
|
} else {
|
||||||
|
panic(fmt.Sprintf("unused cc_stub_suite attr %q\n", key))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return MakeBazelTarget("cc_stub_suite", name+"_stub_libs", stubSuiteAttrs)
|
return MakeBazelTarget("cc_stub_suite", name+"_stub_libs", stubSuiteAttrs)
|
||||||
|
@@ -458,7 +458,7 @@ func createStubsBazelTargetIfNeeded(ctx android.TopDownMutatorContext, m *Module
|
|||||||
Versions: compilerAttrs.stubsVersions,
|
Versions: compilerAttrs.stubsVersions,
|
||||||
Export_includes: exportedIncludes.Includes,
|
Export_includes: exportedIncludes.Includes,
|
||||||
Soname: &soname,
|
Soname: &soname,
|
||||||
Source_library: *bazel.MakeLabelAttribute(":" + m.Name()),
|
Source_library_label: proptools.StringPtr(m.GetBazelLabel(ctx, m)),
|
||||||
Deps: baseAttributes.deps,
|
Deps: baseAttributes.deps,
|
||||||
}
|
}
|
||||||
ctx.CreateBazelTargetModule(stubSuitesProps,
|
ctx.CreateBazelTargetModule(stubSuitesProps,
|
||||||
@@ -3036,7 +3036,7 @@ type bazelCcStubSuiteAttributes struct {
|
|||||||
Symbol_file *string
|
Symbol_file *string
|
||||||
Versions bazel.StringListAttribute
|
Versions bazel.StringListAttribute
|
||||||
Export_includes bazel.StringListAttribute
|
Export_includes bazel.StringListAttribute
|
||||||
Source_library bazel.LabelAttribute
|
Source_library_label *string
|
||||||
Soname *string
|
Soname *string
|
||||||
Deps bazel.LabelListAttribute
|
Deps bazel.LabelListAttribute
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user