Merge "Handle absolute source paths correctly."
This commit is contained in:
commit
a9a99bc6d2
2 changed files with 15 additions and 2 deletions
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
package android
|
package android
|
||||||
|
|
||||||
|
import "path/filepath"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
RegisterModuleType("prebuilt_build_tool", prebuiltBuildToolFactory)
|
RegisterModuleType("prebuilt_build_tool", prebuiltBuildToolFactory)
|
||||||
}
|
}
|
||||||
|
@ -58,13 +60,18 @@ func (t *prebuiltBuildTool) GenerateAndroidBuildActions(ctx ModuleContext) {
|
||||||
installedPath := PathForModuleOut(ctx, t.ModuleBase.Name())
|
installedPath := PathForModuleOut(ctx, t.ModuleBase.Name())
|
||||||
deps := PathsForModuleSrc(ctx, t.properties.Deps)
|
deps := PathsForModuleSrc(ctx, t.properties.Deps)
|
||||||
|
|
||||||
|
var fromPath = sourcePath.String()
|
||||||
|
if !filepath.IsAbs(fromPath) {
|
||||||
|
fromPath = "$$PWD/" + fromPath
|
||||||
|
}
|
||||||
|
|
||||||
ctx.Build(pctx, BuildParams{
|
ctx.Build(pctx, BuildParams{
|
||||||
Rule: Symlink,
|
Rule: Symlink,
|
||||||
Output: installedPath,
|
Output: installedPath,
|
||||||
Input: sourcePath,
|
Input: sourcePath,
|
||||||
Implicits: deps,
|
Implicits: deps,
|
||||||
Args: map[string]string{
|
Args: map[string]string{
|
||||||
"fromPath": "$$PWD/" + sourcePath.String(),
|
"fromPath": fromPath,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ package cc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
|
"path/filepath"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -360,13 +361,18 @@ func (p *prebuiltBinaryLinker) link(ctx ModuleContext,
|
||||||
sharedLibPaths = append(sharedLibPaths, deps.SharedLibs...)
|
sharedLibPaths = append(sharedLibPaths, deps.SharedLibs...)
|
||||||
sharedLibPaths = append(sharedLibPaths, deps.LateSharedLibs...)
|
sharedLibPaths = append(sharedLibPaths, deps.LateSharedLibs...)
|
||||||
|
|
||||||
|
var fromPath = in.String()
|
||||||
|
if !filepath.IsAbs(fromPath) {
|
||||||
|
fromPath = "$$PWD/" + fromPath
|
||||||
|
}
|
||||||
|
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
Rule: android.Symlink,
|
Rule: android.Symlink,
|
||||||
Output: outputFile,
|
Output: outputFile,
|
||||||
Input: in,
|
Input: in,
|
||||||
Implicits: sharedLibPaths,
|
Implicits: sharedLibPaths,
|
||||||
Args: map[string]string{
|
Args: map[string]string{
|
||||||
"fromPath": "$$PWD/" + in.String(),
|
"fromPath": fromPath,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue