diff options
author | Jooyung Han <jooyung@google.com> | 2021-06-03 13:56:24 +0900 |
---|---|---|
committer | Jooyung Han <jooyung@google.com> | 2021-06-04 08:49:53 +0900 |
commit | af45dbb3f33994fe7f4ee6e8374e82e92f96f705 (patch) | |
tree | 593fc6fa5acab93012d5873e98398a2aa019b2d2 /build/aidl_gen_rule.go | |
parent | 60699b5f0010228906c13f288ae37077c326deb3 (diff) | |
download | aidl-af45dbb3f33994fe7f4ee6e8374e82e92f96f705.tar.gz |
refactor: use getPaths() instead of getBaseDir()
getPaths() now supports filegroup/genrule/etc and returns src paths
which consist of "basedir + rel".
Bug: 189288369
Test: m
Change-Id: I9af0fe23b4c334d947c5d51c432acfaf2e0cdeb5
Diffstat (limited to 'build/aidl_gen_rule.go')
-rw-r--r-- | build/aidl_gen_rule.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/build/aidl_gen_rule.go b/build/aidl_gen_rule.go index 6af65a54..c38f1b45 100644 --- a/build/aidl_gen_rule.go +++ b/build/aidl_gen_rule.go @@ -141,7 +141,8 @@ func (g *aidlGenRule) GenerateAndroidBuildActions(ctx android.ModuleContext) { } func (g *aidlGenRule) generateBuildActionsForSingleAidl(ctx android.ModuleContext, src android.Path) (android.WritablePath, android.Paths) { - baseDir := getBaseDir(ctx, src, android.PathForModuleSrc(ctx, g.properties.AidlRoot)) + relPath := src.Rel() + baseDir := strings.TrimSuffix(strings.TrimSuffix(src.String(), relPath), "/") var ext string if g.properties.Lang == langJava { @@ -151,7 +152,6 @@ func (g *aidlGenRule) generateBuildActionsForSingleAidl(ctx android.ModuleContex } else { ext = "cpp" } - relPath, _ := filepath.Rel(baseDir, src.String()) outFile := android.PathForModuleGen(ctx, pathtools.ReplaceExtension(relPath, ext)) implicits := g.implicitInputs |