Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8dbc653d authored by Jiwen 'Steve' Cai's avatar Jiwen 'Steve' Cai
Browse files

Add exclude_header_libs for vendor_available:true libs

Adding a mechanism to conditionally exclude some header library
dependencies when a lib is built for vendors.

Without this, some libraries cannot be earily marked as vendor_available
if they are depending on header libs can shouldn't be marked as
vendor_available.

By using exclude_header_libs with exclude_srcs (or __ANDROID_VNDK__
macro), we can eliminate the unnecessary dependency for vendors.

Bug: 112338314
Test: build
Change-Id: If12dceb6045099fe828fe33af2ac4428f88499a2
parent 1d5ed780
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -103,6 +103,10 @@ type BaseLinkerProperties struct {
			// of the C/C++ module.
			Exclude_static_libs []string

			// list of header libs that should not be used to build the vendor variant
			// of the C/C++ module.
			Exclude_header_libs []string

			// list of runtime libs that should not be installed along with the vendor
			// variant of the C/C++ module.
			Exclude_runtime_libs []string
@@ -190,6 +194,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
		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)
		deps.HeaderLibs = removeListFromList(deps.HeaderLibs, linker.Properties.Target.Vendor.Exclude_header_libs)
		deps.ReexportStaticLibHeaders = removeListFromList(deps.ReexportStaticLibHeaders, linker.Properties.Target.Vendor.Exclude_static_libs)
		deps.WholeStaticLibs = removeListFromList(deps.WholeStaticLibs, linker.Properties.Target.Vendor.Exclude_static_libs)
		deps.RuntimeLibs = removeListFromList(deps.RuntimeLibs, linker.Properties.Target.Vendor.Exclude_runtime_libs)