diff options
author | Nan Zhang <nanzhang@google.com> | 2018-03-27 16:19:42 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2018-03-28 14:54:50 -0700 |
commit | 2e9f9a2220cd8f8e4096e6ac373436d5ba3f644e (patch) | |
tree | a202dc4a962787d897759ce024c5623c3e1eeeea /cc | |
parent | 0a7d85a89609053e604035c27552dcf8cd483f5d (diff) | |
download | build_soong-2e9f9a2220cd8f8e4096e6ac373436d5ba3f644e.tar.gz build_soong-2e9f9a2220cd8f8e4096e6ac373436d5ba3f644e.tar.bz2 build_soong-2e9f9a2220cd8f8e4096e6ac373436d5ba3f644e.zip |
Fix the flaky build breakage for droiddoc target.
ExpandSourcesSubDir was calling SourceFileProducer.Srcs(), and then
doing:
moduleSrcs = append(moduleSrcs[:j], moduleSrcs[j+1:]...)
This modifies the backing store of the slice, which may affect the
original data stored in the SourceFileProducer. Make all Srcs
implementations return slice that points to a copy of the backing
array.
Test: m out/target/common/obj/PACKAGING/checkpublicapi-current-timestamp
Bug: b/76179848 b/76397326
Change-Id: I2432ce196984814daafc5aa9a2746e81de74494c
Merged-In: I2432ce196984814daafc5aa9a2746e81de74494c
(cherry picked from commit e42777a05a1f4bdde22b0dce03f3361e52e2dbae)
Diffstat (limited to 'cc')
-rw-r--r-- | cc/compiler.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cc/compiler.go b/cc/compiler.go index ef222854..83bb3311 100644 --- a/cc/compiler.go +++ b/cc/compiler.go @@ -180,7 +180,7 @@ type CompiledInterface interface { } func (compiler *baseCompiler) Srcs() android.Paths { - return compiler.srcs + return append(android.Paths{}, compiler.srcs...) } func (compiler *baseCompiler) appendCflags(flags []string) { |