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
F102797561: D38770.id117968.diff
Sun, Nov 17, 8:05 AM
Unknown Object (File)
Sat, Nov 16, 11:46 AM
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
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