From b36b39f7683b5e93fa2811bd0a9404676853f194 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 28 Dec 2019 20:15:12 +0100 Subject: [PATCH] android: add 'Restat: true' to tblgenRule definition (llvm90) Based on suggestion by Colin Cross, to avoid unnecessary rebuild of llvm90 in case of *.inc generated sources older than llvm90-tblgen binary. When llvm90-tblgen binary is compiled and for some reason the build is interrupted, the generated *.inc files will have a timestamp older than llvm90-tblgen binary, at this point all libLLVM* targets depending on the *.inc files are always rebuilt. 'NINJA_ARGS="-d explain" make iso_img' command revealed the cause of the problem: ninja explain: output out/soong/.intermediates/external/llvm90/llvm90-gen-attributes/gen/llvm/IR/Attributes.inc older than most recent input out/soong/host/linux-x86/bin/llvm90-tblgen (1570914978 vs 1575285173) ninja explain: out/soong/.intermediates/external/llvm90/llvm90-gen-attributes/gen/llvm/IR/Attributes.inc is dirty Signed-off-by: Mauro Rossi --- soong/tblgen.go | 1 + 1 file changed, 1 insertion(+) diff --git a/soong/tblgen.go b/soong/tblgen.go index 3b5d8360614..acbe783c925 100644 --- a/soong/tblgen.go +++ b/soong/tblgen.go @@ -39,6 +39,7 @@ var ( Command: "${llvm90Tblgen} ${includes} ${generator} -d ${depfile} -o ${out} ${in}", CommandDeps: []string{"${llvm90Tblgen}"}, Description: "LLVM90 TableGen $in => $out", + Restat: true, }, "includes", "depfile", "generator") ) -- 2.11.0