diff options
author | 2024-05-13 11:57:16 -0700 | |
---|---|---|
committer | 2024-05-13 11:57:16 -0700 | |
commit | 6bb2832c151a629616da36221d88d05b3501a314 (patch) | |
tree | 2746ff7b05324e6c157cba0a9d821083c7288a72 | |
parent | cd8dc7080692afa995e721d8b7dc3bc4ab9c2329 (diff) |
Fix a check for the ninja_log
soong_build uses / as it's cwd, so we need to specify the top directory
when checkign for files.
Test: add a printf in the if statement; touch out/soong/Android.bp && m nothing; ensure printf doesn't fire
Change-Id: Iba9773765547b22a03dbca33aa6b8c75359cb5ff
-rw-r--r-- | cmd/soong_build/main.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/soong_build/main.go b/cmd/soong_build/main.go index d64010e66..4490dd2af 100644 --- a/cmd/soong_build/main.go +++ b/cmd/soong_build/main.go @@ -108,7 +108,7 @@ func needToWriteNinjaHint(ctx *android.Context) bool { case "always": return true case "depend": - if _, err := os.Stat(filepath.Join(ctx.Config().OutDir(), ".ninja_log")); errors.Is(err, os.ErrNotExist) { + if _, err := os.Stat(filepath.Join(topDir, ctx.Config().OutDir(), ".ninja_log")); errors.Is(err, os.ErrNotExist) { return true } } |