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:
Colin Cross
2015-07-06 17:48:31 -07:00
parent 2617316f6c
commit aee540a439
4 changed files with 31 additions and 4 deletions

View File

@@ -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