Add unstrippedOutputFilePath to the linker interface
Test: m
Change-Id: I85a0cbda6ebb9838451ed8c607c2087460b7b742
diff --git a/cc/binary.go b/cc/binary.go
index d4edc1a..a8eb641 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -405,6 +405,10 @@
return ret
}
+func (binary *binaryDecorator) unstrippedOutputFilePath() android.Path {
+ return binary.unstrippedOutputFile
+}
+
func (binary *binaryDecorator) symlinkList() []string {
return binary.symlinks
}
diff --git a/cc/cc.go b/cc/cc.go
index 58ea5e1..4c26e60 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -306,6 +306,7 @@
link(ctx ModuleContext, flags Flags, deps PathDeps, objs Objects) android.Path
appendLdflags([]string)
+ unstrippedOutputFilePath() android.Path
}
type installer interface {
@@ -406,10 +407,8 @@
}
func (c *Module) UnstrippedOutputFile() android.Path {
- if library, ok := c.linker.(*libraryDecorator); ok {
- return library.unstrippedOutputFile
- } else if binary, ok := c.linker.(*binaryDecorator); ok {
- return binary.unstrippedOutputFile
+ if c.linker != nil {
+ return c.linker.unstrippedOutputFilePath()
}
return nil
}
diff --git a/cc/library.go b/cc/library.go
index c01b3e7..13acfae 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -740,6 +740,10 @@
return ret
}
+func (library *libraryDecorator) unstrippedOutputFilePath() android.Path {
+ return library.unstrippedOutputFile
+}
+
func getRefAbiDumpFile(ctx ModuleContext, vndkVersion, fileName string) android.Path {
isLlndk := inList(ctx.baseModuleName(), llndkLibraries) || inList(ctx.baseModuleName(), ndkMigratedLibs)
diff --git a/cc/object.go b/cc/object.go
index 552f639..b9c5742 100644
--- a/cc/object.go
+++ b/cc/object.go
@@ -107,3 +107,7 @@
ctx.CheckbuildFile(outputFile)
return outputFile
}
+
+func (object *objectLinker) unstrippedOutputFilePath() android.Path {
+ return nil
+}