From 46b68970517885557cf25f21dc5b9b4c802155ee Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Tue, 26 Mar 2024 10:56:07 -0700 Subject: Pass output file argument to guice_munge instead of redirecting. It looks like a recent change to the JDK has caused logs to be written to stdout intermittently, causing errors such as the following when compiling a source file processed by guice_munge: out.cfa64l5/soong/.intermediates/external/guice/guice/linux_glibc_common/javac/srcjars/external/guice/core/src/com/google/inject/internal/InternalProviderInstanceBindingImpl.java:1: error: class, interface, enum, or record expected [0.003s][warning][perf,memops] Cannot use file /tmp/hsperfdata_nobody/75537 because it is locked by another process (errno = 11) ^ Avoid the problem by passing an output file argument to guice_munge instead of redirecting stdout to the output file. Bug: 330410989 Change-Id: I218f9b8597b77350e810d1bfcfa60fe94312c876 --- Android.bp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Android.bp b/Android.bp index fe9cbf7a..cfc7813c 100644 --- a/Android.bp +++ b/Android.bp @@ -108,7 +108,7 @@ genrule { ], cmd: "for src in $(in); do " + " mkdir -p $$(dirname $(genDir)/$${src}) && " + - " $(location guice_munge) -DNO_AOP $${src} > $(genDir)/$${src} || exit 1; " + + " $(location guice_munge) -DNO_AOP $${src} $(genDir)/$${src} || exit 1; " + " done && " + " $(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)", } -- cgit v1.2.3