HomeFreeBSD

Ensure .inc files are regenerated when llvm/clang tblgen binaries change

Description

Ensure .inc files are regenerated when llvm/clang tblgen binaries change

When doing a fully incremental build (with WITHOUT_CLEAN enabled), from
a commit before llvm 15 was merged (3264f6b88fce), to a commit after
that, a number of .inc files were not regenerated. This could lead to
unexpected compilation errors when these .inc files were included from
llvm-project sources, similar to:

In file included from /usr/src/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:8268:
/usr/obj/usr/src/amd64.amd64/lib/clang/libclang/clang/Basic/arm_mve_builtin_cg.inc:279:18: error: no matching constructor for initialization of 'clang::CodeGen::Address'
  Address Val2 = Address(Val1, CharUnits::fromQuantity(2));
                 ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Work around this by making the .inc files dependent on the tblgen binary
used for generating them. E.g., we can relatively safely assume that if
the binary gets updated, the .inc files must also be updated. (Although
this is not 100% optimal, the gain by complicating things even more is
probaby not worth the effort.)

Approved by: re (cperciva)
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38770

(cherry picked from commit ab80f0b21fbb9c44d40e6f7a99090188f4ed2f71)
(cherry picked from commit 3912f99ecae61dc7fe89c076a654332e3adb1bdc)

Details

Provenance
dimAuthored on Feb 25 2023, 3:25 PM
Reviewer
emaste
Differential Revision
D38770: Ensure .inc files are regenerated when llvm/clang tblgen binaries change
Parents
rG13264ea9a370: 13.2: update to RC1
Branches
Unknown
Tags
Unknown