Fix toc path
toc path was including the build directory twice, which breaks builds
with absolute paths to the build directory.
Test: m -j
Bug: 26014946
Change-Id: Ibc0856d1b22a44ec0c297f5dd84a932fde9f20af
diff --git a/cc/library.go b/cc/library.go
index 53c9a58..5a7afe1 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -453,7 +453,7 @@
// that is run during the build, use the library directly so
// that the timestamp of the binary changes whenever a library
// changes and any necessary tools get re-run.
- tocPath := outputFile.String()
+ tocPath := outputFile.RelPathString()
tocPath = pathtools.ReplaceExtension(tocPath, flags.Toolchain.ShlibSuffix()[1:]+".toc")
tocFile := android.PathForOutput(ctx, tocPath)
library.tocFile = android.OptionalPathForPath(tocFile)