Export strip information to Make
Change-Id: I3c69451a505ac2b97f3112050acc4b64b1cd7394
diff --git a/cc/androidmk.go b/cc/androidmk.go
index 4e35f0e..499736d 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -79,6 +79,8 @@
func (library *libraryLinker) AndroidMk(ret *android.AndroidMkData) {
library.baseLinker.AndroidMk(ret)
+ library.stripper.AndroidMk(ret)
+
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error {
var exportedIncludes []string
for _, flag := range library.exportedFlags() {
@@ -110,6 +112,8 @@
}
func (binary *binaryLinker) AndroidMk(ret *android.AndroidMkData) {
+ binary.stripper.AndroidMk(ret)
+
ret.Class = "EXECUTABLES"
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error {
fmt.Fprintln(w, "LOCAL_CXX_STL := none")
@@ -137,6 +141,18 @@
})
}
+func (stripper *stripper) AndroidMk(ret *android.AndroidMkData) {
+ ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error {
+ if stripper.StripProperties.Strip.None {
+ fmt.Fprintln(w, "LOCAL_STRIP_MODULE := false")
+ } else if stripper.StripProperties.Strip.Keep_symbols {
+ fmt.Fprintln(w, "LOCAL_STRIP_MODULE := keep_symbols")
+ }
+
+ return nil
+ })
+}
+
func (installer *baseInstaller) AndroidMk(ret *android.AndroidMkData) {
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error {
path := installer.path.RelPathString()