Specify working directory and OUT_DIR to ABI tools

This commit adds `--root-dir . --root-dir $OUT_DIR:out` to the commands
of ABI tools. If the user sets non-default $OUT_DIR, the tools write
"out" instead of the actual $OUT_DIR to the ABI dumps.

Test: export OUT_DIR=~/aosp_out ; \
      make libstagefright_bufferqueue_helper.vendor
Bug: 192157880
Change-Id: I4e2d1b252273106fb6a3ecfa1727d5c91ba03444
This commit is contained in:
Hsin-Yi Chen
2021-07-09 15:59:03 +08:00
parent 393bffee78
commit 79781a94f0

View File

@@ -237,7 +237,7 @@ var (
// -w has been added since header-abi-dumper does not need to produce any sort of diagnostic information.
sAbiDump, sAbiDumpRE = pctx.RemoteStaticRules("sAbiDump",
blueprint.RuleParams{
Command: "rm -f $out && $reTemplate$sAbiDumper -o ${out} $in $exportDirs -- $cFlags -w -isystem prebuilts/clang-tools/${config.HostPrebuiltTag}/clang-headers",
Command: "rm -f $out && $reTemplate$sAbiDumper --root-dir . --root-dir $$OUT_DIR:out -o ${out} $in $exportDirs -- $cFlags -w -isystem prebuilts/clang-tools/${config.HostPrebuiltTag}/clang-headers",
CommandDeps: []string{"$sAbiDumper"},
}, &remoteexec.REParams{
Labels: map[string]string{"type": "abi-dump", "tool": "header-abi-dumper"},
@@ -255,7 +255,7 @@ var (
// sAbi dump file.
sAbiLink, sAbiLinkRE = pctx.RemoteStaticRules("sAbiLink",
blueprint.RuleParams{
Command: "$reTemplate$sAbiLinker -o ${out} $symbolFilter -arch $arch $exportedHeaderFlags @${out}.rsp ",
Command: "$reTemplate$sAbiLinker --root-dir . --root-dir $$OUT_DIR:out -o ${out} $symbolFilter -arch $arch $exportedHeaderFlags @${out}.rsp",
CommandDeps: []string{"$sAbiLinker"},
Rspfile: "${out}.rsp",
RspfileContent: "${in}",