Loading cc/cc_test.go +2 −6 Original line number Diff line number Diff line Loading @@ -894,9 +894,7 @@ func TestVndkUseVndkExtError(t *testing.T) { } `) // The pattern should be "module \".*\" variant \".*\": \\(.*\\) should not link to \".*\"" // but target.vendor.shared_libs has not been supported yet. testCcError(t, "unrecognized property \"target.vendor.shared_libs\"", ` testCcError(t, "module \".*\" variant \".*\": \\(.*\\) should not link to \".*\"", ` cc_library { name: "libvndk", vendor_available: true, Loading Loading @@ -965,9 +963,7 @@ func TestVndkUseVndkExtError(t *testing.T) { } `) // The pattern should be "module \".*\" variant \".*\": \\(.*\\) should not link to \".*\"" // but target.vendor.shared_libs has not been supported yet. testCcError(t, "unrecognized property \"target.vendor.shared_libs\"", ` testCcError(t, "module \".*\" variant \".*\": \\(.*\\) should not link to \".*\"", ` cc_library { name: "libvndk_sp", vendor_available: true, Loading cc/linker.go +10 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,10 @@ type BaseLinkerProperties struct { Target struct { Vendor struct { // list of shared libs that only should be used to build the vendor // variant of the C/C++ module. Shared_libs []string // list of shared libs that should not be used to build the vendor variant // of the C/C++ module. Exclude_shared_libs []string Loading @@ -116,6 +120,10 @@ type BaseLinkerProperties struct { Exclude_runtime_libs []string } Recovery struct { // list of shared libs that only should be used to build the recovery // variant of the C/C++ module. Shared_libs []string // list of shared libs that should not be used to build // the recovery variant of the C/C++ module. Exclude_shared_libs []string Loading Loading @@ -200,6 +208,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { } if ctx.useVndk() { deps.SharedLibs = append(deps.SharedLibs, linker.Properties.Target.Vendor.Shared_libs...) deps.SharedLibs = removeListFromList(deps.SharedLibs, linker.Properties.Target.Vendor.Exclude_shared_libs) deps.ReexportSharedLibHeaders = removeListFromList(deps.ReexportSharedLibHeaders, linker.Properties.Target.Vendor.Exclude_shared_libs) deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Target.Vendor.Exclude_static_libs) Loading @@ -210,6 +219,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { } if ctx.inRecovery() { deps.SharedLibs = append(deps.SharedLibs, linker.Properties.Target.Recovery.Shared_libs...) deps.SharedLibs = removeListFromList(deps.SharedLibs, linker.Properties.Target.Recovery.Exclude_shared_libs) deps.ReexportSharedLibHeaders = removeListFromList(deps.ReexportSharedLibHeaders, linker.Properties.Target.Recovery.Exclude_shared_libs) deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Target.Recovery.Exclude_static_libs) Loading Loading
cc/cc_test.go +2 −6 Original line number Diff line number Diff line Loading @@ -894,9 +894,7 @@ func TestVndkUseVndkExtError(t *testing.T) { } `) // The pattern should be "module \".*\" variant \".*\": \\(.*\\) should not link to \".*\"" // but target.vendor.shared_libs has not been supported yet. testCcError(t, "unrecognized property \"target.vendor.shared_libs\"", ` testCcError(t, "module \".*\" variant \".*\": \\(.*\\) should not link to \".*\"", ` cc_library { name: "libvndk", vendor_available: true, Loading Loading @@ -965,9 +963,7 @@ func TestVndkUseVndkExtError(t *testing.T) { } `) // The pattern should be "module \".*\" variant \".*\": \\(.*\\) should not link to \".*\"" // but target.vendor.shared_libs has not been supported yet. testCcError(t, "unrecognized property \"target.vendor.shared_libs\"", ` testCcError(t, "module \".*\" variant \".*\": \\(.*\\) should not link to \".*\"", ` cc_library { name: "libvndk_sp", vendor_available: true, Loading
cc/linker.go +10 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,10 @@ type BaseLinkerProperties struct { Target struct { Vendor struct { // list of shared libs that only should be used to build the vendor // variant of the C/C++ module. Shared_libs []string // list of shared libs that should not be used to build the vendor variant // of the C/C++ module. Exclude_shared_libs []string Loading @@ -116,6 +120,10 @@ type BaseLinkerProperties struct { Exclude_runtime_libs []string } Recovery struct { // list of shared libs that only should be used to build the recovery // variant of the C/C++ module. Shared_libs []string // list of shared libs that should not be used to build // the recovery variant of the C/C++ module. Exclude_shared_libs []string Loading Loading @@ -200,6 +208,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { } if ctx.useVndk() { deps.SharedLibs = append(deps.SharedLibs, linker.Properties.Target.Vendor.Shared_libs...) deps.SharedLibs = removeListFromList(deps.SharedLibs, linker.Properties.Target.Vendor.Exclude_shared_libs) deps.ReexportSharedLibHeaders = removeListFromList(deps.ReexportSharedLibHeaders, linker.Properties.Target.Vendor.Exclude_shared_libs) deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Target.Vendor.Exclude_static_libs) Loading @@ -210,6 +219,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { } if ctx.inRecovery() { deps.SharedLibs = append(deps.SharedLibs, linker.Properties.Target.Recovery.Shared_libs...) deps.SharedLibs = removeListFromList(deps.SharedLibs, linker.Properties.Target.Recovery.Exclude_shared_libs) deps.ReexportSharedLibHeaders = removeListFromList(deps.ReexportSharedLibHeaders, linker.Properties.Target.Recovery.Exclude_shared_libs) deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Target.Recovery.Exclude_static_libs) Loading