diff options
author | Jooyung Han <jooyung@google.com> | 2021-04-30 03:13:59 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-04-30 03:13:59 +0000 |
commit | 521d2c60ceb680f4ad107e1369df19d1a5120116 (patch) | |
tree | d9a92117dac9a0a989ea398219689a84e93a088e | |
parent | f2d6b28dbe9f28987ce7508a4144276d4a2f272b (diff) | |
parent | 31d77b80a201492e42386b3db99c48010ae4447c (diff) | |
download | aidl-521d2c60ceb680f4ad107e1369df19d1a5120116.tar.gz |
Add phony target for genrule am: 65f412d082 am: 14440b5dfa am: e0ff174661 am: 31d77b80a2
Original change: https://android-review.googlesource.com/c/platform/system/tools/aidl/+/1688284
Change-Id: I183884e8121e59e1c03d5544dd9ae5787387c5ca
-rw-r--r-- | build/aidl_gen_rule.go | 9 | ||||
-rw-r--r-- | build/aidl_interface.go | 1 | ||||
-rwxr-xr-x | tests/golden_test.sh | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/build/aidl_gen_rule.go b/build/aidl_gen_rule.go index f9eeb231..79608245 100644 --- a/build/aidl_gen_rule.go +++ b/build/aidl_gen_rule.go @@ -104,7 +104,7 @@ func (g *aidlGenRule) GenerateAndroidBuildActions(ctx android.ModuleContext) { return } - genDirTimestamp := android.PathForModuleGen(ctx, "timestamp") + genDirTimestamp := android.PathForModuleGen(ctx, "timestamp") // $out/gen/timestamp g.implicitInputs = append(g.implicitInputs, genDirTimestamp) var importPaths []string @@ -142,6 +142,13 @@ func (g *aidlGenRule) GenerateAndroidBuildActions(ctx android.ModuleContext) { "outDir": g.genOutDir.String(), }, }) + + // This is to trigger genrule alone + ctx.Build(pctx, android.BuildParams{ + Rule: android.Phony, + Output: android.PathForModuleOut(ctx, "timestamp"), // $out/timestamp + Inputs: g.genOutputs.Paths(), + }) } func (g *aidlGenRule) generateBuildActionsForSingleAidl(ctx android.ModuleContext, src android.Path) (android.WritablePath, android.Paths) { diff --git a/build/aidl_interface.go b/build/aidl_interface.go index ab7629d1..f25ea57f 100644 --- a/build/aidl_interface.go +++ b/build/aidl_interface.go @@ -51,6 +51,7 @@ var ( ) func init() { + pctx.Import("android/soong/android") pctx.HostBinToolVariable("aidlCmd", "aidl") pctx.SourcePathVariable("aidlToJniCmd", "system/tools/aidl/build/aidl_to_jni.py") pctx.SourcePathVariable("aidlRustGlueCmd", "system/tools/aidl/build/aidl_rust_glue.py") diff --git a/tests/golden_test.sh b/tests/golden_test.sh index 826eba3c..9729bd55 100755 --- a/tests/golden_test.sh +++ b/tests/golden_test.sh @@ -55,7 +55,7 @@ function _golden_test() { if [ "$update" = 1 ]; then "$root"/build/soong/soong_ui.bash --make-mode \ $(for i in "${modules[@]}"; do - echo "$i" | sed 's/-source//' + echo "out/soong/.intermediates/system/tools/aidl/$i/timestamp" done) fi @@ -67,7 +67,7 @@ function _golden_test() { if [ "$update" = 1 ]; then rm -rf "$golden" mkdir -p "$golden" - cp -r "$built" "$golden/.." + cp -r "$built/gen" "$golden" else diff -r "$built" "$golden" || e=1 fi |