aboutsummaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-03-10 16:25:53 -0800
committerDan Willemsen <dwillemsen@google.com>2018-04-17 10:34:23 -0700
commite9216117dd376aa48476c0ef448fcbd818961861 (patch)
treea9aea6aaafe0df6a03b2d43915f407d669286fc1 /cc
parentbf4f0a0965a95e699458c511016a371e99f4a57f (diff)
downloadbuild_soong-e9216117dd376aa48476c0ef448fcbd818961861.tar.gz
build_soong-e9216117dd376aa48476c0ef448fcbd818961861.tar.bz2
build_soong-e9216117dd376aa48476c0ef448fcbd818961861.zip
Add DistPath to reference the dist folder
Instead of open-coding the logic of whether there is one, or where to find it. Bug: 76168832 Test: diff out/soong/build.ninja without dist Test: diff out/soong/build.ninja with dist specified Change-Id: Ia3f1ef335e2d6e2175343338d04867d778a50300 Merged-In: Ia3f1ef335e2d6e2175343338d04867d778a50300 (cherry picked from commit bc0c5092671cbe7e58ab6a1f886414f864af3024)
Diffstat (limited to 'cc')
-rw-r--r--cc/builder.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/cc/builder.go b/cc/builder.go
index d438add9..73a91682 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -199,11 +199,10 @@ var (
func(ctx android.PackageRuleContext) blueprint.RuleParams {
commandStr := "($sAbiDiffer $allowFlags -lib $libName -arch $arch -check-all-apis -o ${out} -new $in -old $referenceDump)"
- distDir := ctx.Config().ProductVariables.DistDir
- commandStr += " || (echo ' ---- Please update abi references by running platform/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l ${libName} ----'"
- if distDir != nil && *distDir != "" {
- distAbiDiffDir := *distDir + "/abidiffs/"
- commandStr += " && (mkdir -p " + distAbiDiffDir + " && cp ${out} " + distAbiDiffDir + ")"
+ distAbiDiffDir := android.PathForDist(ctx, "abidiffs")
+ commandStr += "|| (echo ' ---- Please update abi references by running platform/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l ${libName} ----'"
+ if distAbiDiffDir.Valid() {
+ commandStr += " && (mkdir -p " + distAbiDiffDir.String() + " && cp ${out} " + distAbiDiffDir.String() + ")"
}
commandStr += " && exit 1)"
return blueprint.RuleParams{