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, Nov 6, 3:07 PM
Unknown Object (File)
Wed, Nov 6, 3:07 PM
Unknown Object (File)
Wed, Nov 6, 3:07 PM
Unknown Object (File)
Tue, Nov 5, 2:46 AM
Unknown Object (File)
Oct 1 2024, 7:46 AM
Unknown Object (File)
Sep 19 2024, 6:26 PM
Unknown Object (File)
Sep 17 2024, 2:59 AM
Unknown Object (File)
Sep 4 2024, 4:33 AM
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