Merge "Add two more vendor-specific properties"
This commit is contained in:
commit
fa9ff8441a
2 changed files with 21 additions and 1 deletions
|
@ -64,6 +64,12 @@ type LibraryProperties struct {
|
||||||
// export headers generated from .proto sources
|
// export headers generated from .proto sources
|
||||||
Export_proto_headers bool
|
Export_proto_headers bool
|
||||||
}
|
}
|
||||||
|
Target struct {
|
||||||
|
Vendor struct {
|
||||||
|
// version script for this vendor variant
|
||||||
|
Version_script *string `android:"arch_variant"`
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type LibraryMutatedProperties struct {
|
type LibraryMutatedProperties struct {
|
||||||
|
@ -455,7 +461,11 @@ func (library *libraryDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
|
||||||
deps.StaticLibs = append(deps.StaticLibs, library.Properties.Shared.Static_libs...)
|
deps.StaticLibs = append(deps.StaticLibs, library.Properties.Shared.Static_libs...)
|
||||||
deps.SharedLibs = append(deps.SharedLibs, library.Properties.Shared.Shared_libs...)
|
deps.SharedLibs = append(deps.SharedLibs, library.Properties.Shared.Shared_libs...)
|
||||||
}
|
}
|
||||||
|
if ctx.useVndk() {
|
||||||
|
deps.WholeStaticLibs = removeListFromList(deps.WholeStaticLibs, library.baseLinker.Properties.Target.Vendor.Exclude_static_libs)
|
||||||
|
deps.SharedLibs = removeListFromList(deps.SharedLibs, library.baseLinker.Properties.Target.Vendor.Exclude_shared_libs)
|
||||||
|
deps.StaticLibs = removeListFromList(deps.StaticLibs, library.baseLinker.Properties.Target.Vendor.Exclude_static_libs)
|
||||||
|
}
|
||||||
return deps
|
return deps
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -491,6 +501,9 @@ func (library *libraryDecorator) linkShared(ctx ModuleContext,
|
||||||
unexportedSymbols := android.OptionalPathForModuleSrc(ctx, library.Properties.Unexported_symbols_list)
|
unexportedSymbols := android.OptionalPathForModuleSrc(ctx, library.Properties.Unexported_symbols_list)
|
||||||
forceNotWeakSymbols := android.OptionalPathForModuleSrc(ctx, library.Properties.Force_symbols_not_weak_list)
|
forceNotWeakSymbols := android.OptionalPathForModuleSrc(ctx, library.Properties.Force_symbols_not_weak_list)
|
||||||
forceWeakSymbols := android.OptionalPathForModuleSrc(ctx, library.Properties.Force_symbols_weak_list)
|
forceWeakSymbols := android.OptionalPathForModuleSrc(ctx, library.Properties.Force_symbols_weak_list)
|
||||||
|
if ctx.useVndk() && library.Properties.Target.Vendor.Version_script != nil {
|
||||||
|
versionScript = android.OptionalPathForModuleSrc(ctx, library.Properties.Target.Vendor.Version_script)
|
||||||
|
}
|
||||||
if !ctx.Darwin() {
|
if !ctx.Darwin() {
|
||||||
if versionScript.Valid() {
|
if versionScript.Valid() {
|
||||||
flags.LdFlags = append(flags.LdFlags, "-Wl,--version-script,"+versionScript.String())
|
flags.LdFlags = append(flags.LdFlags, "-Wl,--version-script,"+versionScript.String())
|
||||||
|
|
|
@ -89,6 +89,10 @@ type BaseLinkerProperties struct {
|
||||||
// list of shared libs that should not be used to build
|
// list of shared libs that should not be used to build
|
||||||
// the vendor variant of the C/C++ module.
|
// the vendor variant of the C/C++ module.
|
||||||
Exclude_shared_libs []string
|
Exclude_shared_libs []string
|
||||||
|
|
||||||
|
// list of static libs that should not be used to build
|
||||||
|
// the vendor variant of the C/C++ module.
|
||||||
|
Exclude_static_libs []string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -135,6 +139,9 @@ func (linker *baseLinker) linkerDeps(ctx BaseModuleContext, deps Deps) Deps {
|
||||||
if ctx.useVndk() {
|
if ctx.useVndk() {
|
||||||
deps.SharedLibs = removeListFromList(deps.SharedLibs, linker.Properties.Target.Vendor.Exclude_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.ReexportSharedLibHeaders = removeListFromList(deps.ReexportSharedLibHeaders, linker.Properties.Target.Vendor.Exclude_shared_libs)
|
||||||
|
deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Target.Vendor.Exclude_static_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)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ctx.ModuleName() != "libcompiler_rt-extras" {
|
if ctx.ModuleName() != "libcompiler_rt-extras" {
|
||||||
|
|
Loading…
Reference in a new issue