Add version_script property
Add version_script property to cc_library to pass a file to the linker with --version-script. Change-Id: Ieefb04e15c8dfa72c2eb63b4349f8860222662b2
This commit is contained in:
@@ -236,6 +236,19 @@ func prependLocalModule(name string, prop *bpparser.Property, suffix *string) ([
|
||||
}, nil
|
||||
}
|
||||
|
||||
func versionScript(name string, prop *bpparser.Property, suffix *string) ([]string, error) {
|
||||
if suffix != nil {
|
||||
name += "_" + *suffix
|
||||
}
|
||||
val, err := valueToString(prop.Value)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return []string{
|
||||
fmt.Sprintf("%s += -Wl,--version-script,$(LOCAL_PATH)/%s\n", name, val),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (w *androidMkWriter) writeModule(moduleRule string, props []string,
|
||||
disabledBuilds map[string]bool, isHostRule bool) {
|
||||
disabledConditionals := disabledTargetConditionals
|
||||
|
@@ -70,6 +70,7 @@ var rewriteProperties = map[string]struct {
|
||||
"local_include_dirs": {"LOCAL_C_INCLUDES", prependLocalPath},
|
||||
"export_include_dirs": {"LOCAL_EXPORT_C_INCLUDE_DIRS", prependLocalPath},
|
||||
"suffix": {"LOCAL_MODULE_STEM", prependLocalModule},
|
||||
"version_script": {"LOCAL_LDFLAGS", versionScript},
|
||||
}
|
||||
|
||||
var ignoredProperties = map[string]bool{
|
||||
|
Reference in New Issue
Block a user