diff options
author | Anas Sulaiman <mrahs@google.com> | 2024-02-07 21:43:40 +0000 |
---|---|---|
committer | Anas Sulaiman <mrahs@google.com> | 2024-02-07 21:46:02 +0000 |
commit | 17d37a5e991fa1dfef41cec8e6e5793696d5a994 (patch) | |
tree | 48c6d111598ecff009a478f114e08464ee75a146 | |
parent | 34b707113283aa69855119e29cdfa125ae4105e5 (diff) | |
download | xsdc-17d37a5e991fa1dfef41cec8e6e5793696d5a994.tar.gz |
Fix recursive archives due to shared in/out dir
The generated sbox command ends up specifying the same directory
for input and output for soong_zip, resulting in including
a partial copy of the archive in itself.
This causes cache misses in accelerated builds.
Specifying a sub-directory for the input resolves the issues.
Requires: https://r.android.com/2954138
Bug: b/322788229
Test: Ran a couple of builds and confirmed no cache misses from xsdc.
Also manually checked an archive and confirmed the
abcence of partial self-copies.
Change-Id: Ic50212cfa4bfc0495af157121c56ce2d63a58942
-rw-r--r-- | build/xsdc.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/build/xsdc.go b/build/xsdc.go index 7b66aa1..a01e11f 100644 --- a/build/xsdc.go +++ b/build/xsdc.go @@ -173,7 +173,7 @@ func (module *xsdConfig) generateJavaSrcInSbox(ctx android.ModuleContext, args s Input(module.xsdConfigPath). FlagWithArg("-p ", *module.properties.Package_name). // Soong will change execution root to sandbox root. Generate srcs relative to that. - Flag("-o ").OutputDir(). + Flag("-o ").OutputDir("xsdc"). FlagWithArg("-j ", args) if module.xsdIncludeConfigPaths != nil { genCmd.Implicits(module.xsdIncludeConfigPaths) @@ -186,8 +186,8 @@ func (module *xsdConfig) generateJavaSrcInSbox(ctx android.ModuleContext, args s BuiltTool("soong_zip"). Flag("-jar"). FlagWithOutput("-o ", module.genOutputs_j). - Flag("-C ").OutputDir(). - Flag("-D ").OutputDir() + Flag("-C ").OutputDir("xsdc"). + Flag("-D ").OutputDir("xsdc") rule.Build("xsdc_java_"+module.xsdConfigPath.String(), "xsdc java") } |