Support prepended arch-specific properties
am: 6ee75b61cd
* commit '6ee75b61cd6aa1f72175fd6c48de2e772c194f7c':
Support prepended arch-specific properties
Change-Id: Ib93e01e93b17d42e2b7b3846668fa7440c6adb89
This commit is contained in:
4
cc/cc.go
4
cc/cc.go
@@ -306,10 +306,10 @@ type BaseLinkerProperties struct {
|
||||
// in their entirety. For static library modules, all of the .o files from the intermediate
|
||||
// directory of the dependency will be linked into this modules .a file. For a shared library,
|
||||
// the dependency's .a file will be linked into this module using -Wl,--whole-archive.
|
||||
Whole_static_libs []string `android:"arch_variant"`
|
||||
Whole_static_libs []string `android:"arch_variant,variant_prepend"`
|
||||
|
||||
// list of modules that should be statically linked into this module.
|
||||
Static_libs []string `android:"arch_variant"`
|
||||
Static_libs []string `android:"arch_variant,variant_prepend"`
|
||||
|
||||
// list of modules that should be dynamically linked into this module.
|
||||
Shared_libs []string `android:"arch_variant"`
|
||||
|
@@ -621,7 +621,17 @@ func (a *AndroidModuleBase) appendProperties(ctx AndroidBottomUpMutatorContext,
|
||||
return true, nil
|
||||
}
|
||||
|
||||
err := proptools.AppendProperties(dst, src, filter)
|
||||
order := func(property string,
|
||||
dstField, srcField reflect.StructField,
|
||||
dstValue, srcValue interface{}) (proptools.Order, error) {
|
||||
if proptools.HasTag(dstField, "android", "variant_prepend") {
|
||||
return proptools.Prepend, nil
|
||||
} else {
|
||||
return proptools.Append, nil
|
||||
}
|
||||
}
|
||||
|
||||
err := proptools.ExtendProperties(dst, src, filter, order)
|
||||
if err != nil {
|
||||
if propertyErr, ok := err.(*proptools.ExtendPropertyError); ok {
|
||||
ctx.PropertyErrorf(propertyErr.Property, "%s", propertyErr.Err.Error())
|
||||
|
Reference in New Issue
Block a user