From 1048a73f218a6735b310bb6abbffa366bb361743 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Wed, 10 Aug 2022 20:51:37 -0700 Subject: [PATCH] CpExecutable should not preserve symlink * When copy to an $out file, a symlink can become a dangling link. * The following chmod +x will fail with a dangling link. Bug: 241815504 Test: presubmit builds Change-Id: Ic3dd9d41376a94381981fb973b41a1650f5ac946 --- android/defs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/defs.go b/android/defs.go index 362b382b3..2a28e98a6 100644 --- a/android/defs.go +++ b/android/defs.go @@ -68,7 +68,7 @@ var ( CpExecutable = pctx.AndroidStaticRule("CpExecutable", blueprint.RuleParams{ - Command: "rm -f $out && cp $cpPreserveSymlinks $cpFlags $in $out && chmod +x $out$extraCmds", + Command: "rm -f $out && cp $cpFlags $in $out && chmod +x $out$extraCmds", Description: "cp $out", }, "cpFlags", "extraCmds")