diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2025-04-18 18:11:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-18 18:11:18 -0700 |
commit | 667209e45122d0cb7a4c2ac27018d31165b1be70 (patch) | |
tree | f39f9ab20130766ceb1a496a5904342bc8adcbc7 /llvm/lib/MC/ELFObjectWriter.cpp | |
parent | 5c3789811fd5b50df1178e7068efb75c5b359383 (diff) | |
download | llvm-667209e45122d0cb7a4c2ac27018d31165b1be70.zip llvm-667209e45122d0cb7a4c2ac27018d31165b1be70.tar.gz llvm-667209e45122d0cb7a4c2ac27018d31165b1be70.tar.bz2 |
Config: Move LLVM_HAS_*_TARGET definitions to a new header.
When enabling or disabling a target we typically need to rebuild most
of LLVM because of the change to the values of the LLVM_HAS_*_TARGET
macros in llvm-config.h, which is included by most of the code, but
are unused by LLVM itself. To avoid this, move the LLVM_HAS_*_TARGET
macros to a separate header, Targets.h.
Update the only in-tree user of the macros (MLIR) to refer to the new
header. I expect that out-of-tree users will detect the change either
at compile time if they build with -Wundef, or at runtime. As far as
I can tell, the usage of these macros is rare in out-of-tree projects,
I found no out-of-tree users in projects indexed by Debian code search
[1], and one user [2] in projects indexed by GitHub code search [3]
(excluding forks of LLVM).
[1] https://codesearch.debian.net/search?q=%23.*LLVM_HAS_.*_TARGET&literal=0
[2] https://github.com/AndreyPavlenko/graph-compiler/blob/238706b12b63945dc490f9f5f33a2d20b3c58944/lib/gc/Target/LLVM/XeVM/Target.cpp#L72
[3] https://github.com/search?q=%2F%23.*LLVM_HAS_.*_TARGET%2F&type=code
Reviewers: nico, grypp, mstorsjo, MaskRay
Reviewed By: MaskRay
Pull Request: https://github.com/llvm/llvm-project/pull/136388
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
0 files changed, 0 insertions, 0 deletions