Page MenuHomeFreeBSD

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

Authored by dim on Feb 25 2023, 3:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 15, 6:16 AM
Unknown Object (File)
Mon, Sep 29, 11:24 AM
Unknown Object (File)
Mon, Sep 29, 10:02 AM
Unknown Object (File)
Sat, Sep 27, 7:39 AM
Unknown Object (File)
Mon, Sep 22, 6:14 AM
Unknown Object (File)
Aug 25 2025, 3:53 AM
Unknown Object (File)
Aug 15 2025, 2:50 AM
Unknown Object (File)
Jul 27 2025, 11:00 PM
Subscribers
None

Details

Summary

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.)

MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable