Merge "Propagate implementation_whole_archive_deps"
This commit is contained in:
@@ -2079,6 +2079,7 @@ func TestCcLibraryProtoSimple(t *testing.T) {
|
|||||||
"deps": `[":libprotobuf-cpp-lite"]`,
|
"deps": `[":libprotobuf-cpp-lite"]`,
|
||||||
}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
||||||
"dynamic_deps": `[":libprotobuf-cpp-lite"]`,
|
"dynamic_deps": `[":libprotobuf-cpp-lite"]`,
|
||||||
|
"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -2105,6 +2106,7 @@ func TestCcLibraryProtoNoCanonicalPathFromRoot(t *testing.T) {
|
|||||||
"deps": `[":libprotobuf-cpp-lite"]`,
|
"deps": `[":libprotobuf-cpp-lite"]`,
|
||||||
}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
||||||
"dynamic_deps": `[":libprotobuf-cpp-lite"]`,
|
"dynamic_deps": `[":libprotobuf-cpp-lite"]`,
|
||||||
|
"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -2130,6 +2132,7 @@ func TestCcLibraryProtoExplicitCanonicalPathFromRoot(t *testing.T) {
|
|||||||
"deps": `[":libprotobuf-cpp-lite"]`,
|
"deps": `[":libprotobuf-cpp-lite"]`,
|
||||||
}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
||||||
"dynamic_deps": `[":libprotobuf-cpp-lite"]`,
|
"dynamic_deps": `[":libprotobuf-cpp-lite"]`,
|
||||||
|
"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -2157,6 +2160,7 @@ func TestCcLibraryProtoFull(t *testing.T) {
|
|||||||
"deps": `[":libprotobuf-cpp-full"]`,
|
"deps": `[":libprotobuf-cpp-full"]`,
|
||||||
}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
||||||
"dynamic_deps": `[":libprotobuf-cpp-full"]`,
|
"dynamic_deps": `[":libprotobuf-cpp-full"]`,
|
||||||
|
"implementation_whole_archive_deps": `[":foo_cc_proto"]`,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -2184,6 +2188,7 @@ func TestCcLibraryProtoLite(t *testing.T) {
|
|||||||
"deps": `[":libprotobuf-cpp-lite"]`,
|
"deps": `[":libprotobuf-cpp-lite"]`,
|
||||||
}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
||||||
"dynamic_deps": `[":libprotobuf-cpp-lite"]`,
|
"dynamic_deps": `[":libprotobuf-cpp-lite"]`,
|
||||||
|
"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -2240,6 +2245,7 @@ func TestCcLibraryProtoIncludeDirs(t *testing.T) {
|
|||||||
"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
|
"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
|
||||||
}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
}), MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
||||||
"dynamic_deps": `[":libprotobuf-cpp-lite"]`,
|
"dynamic_deps": `[":libprotobuf-cpp-lite"]`,
|
||||||
|
"implementation_whole_archive_deps": `[":foo_cc_proto_lite"]`,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -2954,9 +2960,8 @@ cc_library {
|
|||||||
"implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`,
|
"implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`,
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
}),
|
}),
|
||||||
// TODO(b/239311679) Add implementation_whole_archive_deps to cc_library_shared
|
|
||||||
// for bp2build to be fully correct. This fallback is affecting proto as well.
|
|
||||||
MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
||||||
|
"implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`,
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
@@ -2991,10 +2996,9 @@ cc_library {
|
|||||||
"implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`,
|
"implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`,
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
}),
|
}),
|
||||||
// TODO(b/239311679) Add implementation_whole_archive_deps to cc_library_shared
|
|
||||||
// for bp2build to be fully correct. This fallback is affecting proto as well.
|
|
||||||
MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
MakeBazelTarget("cc_library_shared", "foo", AttrNameToString{
|
||||||
"local_includes": `["."]`,
|
"local_includes": `["."]`,
|
||||||
|
"implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@@ -344,6 +344,7 @@ func libraryBp2Build(ctx android.TopDownMutatorContext, m *Module) {
|
|||||||
Dynamic_deps: *linkerAttrs.dynamicDeps.Clone().Append(sharedAttrs.Dynamic_deps),
|
Dynamic_deps: *linkerAttrs.dynamicDeps.Clone().Append(sharedAttrs.Dynamic_deps),
|
||||||
Implementation_dynamic_deps: *linkerAttrs.implementationDynamicDeps.Clone().Append(sharedAttrs.Implementation_dynamic_deps),
|
Implementation_dynamic_deps: *linkerAttrs.implementationDynamicDeps.Clone().Append(sharedAttrs.Implementation_dynamic_deps),
|
||||||
Whole_archive_deps: *linkerAttrs.wholeArchiveDeps.Clone().Append(sharedAttrs.Whole_archive_deps),
|
Whole_archive_deps: *linkerAttrs.wholeArchiveDeps.Clone().Append(sharedAttrs.Whole_archive_deps),
|
||||||
|
Implementation_whole_archive_deps: linkerAttrs.implementationWholeArchiveDeps,
|
||||||
System_dynamic_deps: *linkerAttrs.systemDynamicDeps.Clone().Append(sharedAttrs.System_dynamic_deps),
|
System_dynamic_deps: *linkerAttrs.systemDynamicDeps.Clone().Append(sharedAttrs.System_dynamic_deps),
|
||||||
Runtime_deps: linkerAttrs.runtimeDeps,
|
Runtime_deps: linkerAttrs.runtimeDeps,
|
||||||
sdkAttributes: bp2BuildParseSdkAttributes(m),
|
sdkAttributes: bp2BuildParseSdkAttributes(m),
|
||||||
|
Reference in New Issue
Block a user