diff options
author | 2021-03-10 18:11:57 +0100 | |
---|---|---|
committer | 2021-03-11 08:37:01 +0100 | |
commit | 81a6983dc20c885772001510e29b3a6e717ada5d (patch) | |
tree | a801b58e93804bc248719615bee3918233d16881 /android/writedocs.go | |
parent | 282671d696c926735d5ff54c3b6e75c2b5559169 (diff) |
Fix writedocs.
This probably got broken by aosp/1609473 because soong_build is now
invoked in two different ways:
- By its absolute path during building out/soong/build.ninja
- By its path relative to the source root when generating documentation
Bug: 182347000
Test: Manual (the long incantation on b/182347000)
Change-Id: I0a3a97e4865ffde4a450a3f7baf3980b5a2016c8
Diffstat (limited to 'android/writedocs.go')
-rw-r--r-- | android/writedocs.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/android/writedocs.go b/android/writedocs.go index 6cb2f1024..67b9aa3ad 100644 --- a/android/writedocs.go +++ b/android/writedocs.go @@ -35,10 +35,11 @@ type docsSingleton struct{} func primaryBuilderPath(ctx SingletonContext) Path { buildDir := absolutePath(ctx.Config().BuildDir()) - primaryBuilder, err := filepath.Rel(buildDir, os.Args[0]) + binary := absolutePath(os.Args[0]) + primaryBuilder, err := filepath.Rel(buildDir, binary) if err != nil { - ctx.Errorf("path to primary builder %q is not in build dir %q", - os.Args[0], ctx.Config().BuildDir()) + ctx.Errorf("path to primary builder %q is not in build dir %q (%q)", + os.Args[0], ctx.Config().BuildDir(), err) } return PathForOutput(ctx, primaryBuilder) |