summaryrefslogtreecommitdiff
path: root/android/defs.go
diff options
context:
space:
mode:
author Josh Gao <jmgao@google.com> 2017-07-26 14:09:50 -0700
committer Josh Gao <jmgao@google.com> 2017-07-26 15:38:40 -0700
commitae15271392ada74c29ea5d864ffbeaac436faceb (patch)
treece01119604553fb5fdb36f8c88129375214a4a0e /android/defs.go
parentf5720175dd17df9a234a2fe73605b031313c6d52 (diff)
Delete output files before copying to them.
Avoid ETXTBSY when copying over a file that's being executed. Test: manual Test: m -j Change-Id: I0427b5018e67e12f685bce95028831b5661eee2c
Diffstat (limited to 'android/defs.go')
-rw-r--r--android/defs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/android/defs.go b/android/defs.go
index a7ba219a3..ec8dcf9c0 100644
--- a/android/defs.go
+++ b/android/defs.go
@@ -47,7 +47,7 @@ var (
// A copy rule.
Cp = pctx.AndroidStaticRule("Cp",
blueprint.RuleParams{
- Command: "cp $cpPreserveSymlinks $cpFlags $in $out",
+ Command: "rm -f $out && cp $cpPreserveSymlinks $cpFlags $in $out",
Description: "cp $out",
},
"cpFlags")