commit | 667209e45122d0cb7a4c2ac27018d31165b1be70 | [log] [tgz] |
---|---|---|
author | Peter Collingbourne <peter@pcc.me.uk> | Fri Apr 18 18:11:18 2025 -0700 |
committer | GitHub <noreply@github.com> | Fri Apr 18 18:11:18 2025 -0700 |
tree | f39f9ab20130766ceb1a496a5904342bc8adcbc7 | |
parent | 5c3789811fd5b50df1178e7068efb75c5b359383 [diff] |
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
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.