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)
May 5 2024, 5:02 PM
Unknown Object (File)
Dec 30 2023, 6:34 AM
Unknown Object (File)
Dec 20 2023, 7:45 AM
Unknown Object (File)
Dec 12 2023, 9:49 AM
Unknown Object (File)
Dec 3 2023, 4:53 AM
Unknown Object (File)
Dec 1 2023, 10:16 AM
Unknown Object (File)
Dec 1 2023, 10:16 AM
Unknown Object (File)
Dec 1 2023, 9:59 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