[all-commits] [llvm/llvm-project] ab8b8c: [TargetParser][cmake] Be Smarter about TableGen De...

Sam Elliott via All-commits all-commits at lists.llvm.org
Fri Jun 20 11:05:47 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ab8b8c1e138ae705f251626b63ad2cf4d7937003
      https://github.com/llvm/llvm-project/commit/ab8b8c1e138ae705f251626b63ad2cf4d7937003
  Author: Sam Elliott <quic_aelliott at quicinc.com>
  Date:   2025-06-20 (Fri, 20 Jun 2025)

  Changed paths:
    M llvm/cmake/modules/TableGen.cmake
    M llvm/include/llvm/TargetParser/CMakeLists.txt

  Log Message:
  -----------
  [TargetParser][cmake] Be Smarter about TableGen Deps (#144848)

This tries to be a bit smarter for the OLD behaviour of CMP0116, to glob
more relevant directories looking for possible dependencies.

The changes are:
- Remove some duplication of lines in the `tablegen` function.
- Put CURRENT_SOURCE_DIR into `tblgen_includes` (at the front)
- Glob all directories in `tblgen_includes`
- Give up on `local_tds` which was wrong when using tablegen to compile
a file in a different directory (as TargetParser does)
- Use `EXTRA_INCLUDES` in TargetParser `tablegen` calls.

This is still an under-approximation of what might be included, at least
comparing the RISCVTargetParserDef.inc.d (after building
`target_parser_gen`), and the list of deps in the ninja file when
explicitly setting CMP0116 to OLD.

Fixes #144639



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list