Merge "Handle absolute source paths correctly."

This commit is contained in:
Martin Stjernholm
2020-09-23 13:03:06 +00:00
committed by Gerrit Code Review
2 changed files with 15 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ package cc
import (
"android/soong/android"
"path/filepath"
)
func init() {
@@ -360,13 +361,18 @@ func (p *prebuiltBinaryLinker) link(ctx ModuleContext,
sharedLibPaths = append(sharedLibPaths, deps.SharedLibs...)
sharedLibPaths = append(sharedLibPaths, deps.LateSharedLibs...)
var fromPath = in.String()
if !filepath.IsAbs(fromPath) {
fromPath = "$$PWD/" + fromPath
}
ctx.Build(pctx, android.BuildParams{
Rule: android.Symlink,
Output: outputFile,
Input: in,
Implicits: sharedLibPaths,
Args: map[string]string{
"fromPath": "$$PWD/" + in.String(),
"fromPath": fromPath,
},
})