[compiler-rt] [compiler-rt] Initial support for builtins on GPU targets (PR #95304)
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 13 09:47:24 PDT 2024
petrhosek wrote:
There are two ways to build compiler-rt:
1. The old way in theory supports building for multiple targets in a single build, but in practice only reliably works for sufficiently similar targets like x86 and x86-64 or different flavors of arm32. The target is controlled by `-DCOMPILER_RT_DEFAULT_TARGET`.
2. The new way which builds only for a single target at a time, relying on `-DCMAKE_<LANG>_COMPILER_TARGET`. You also need to set `-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON` to disable the legacy logic. This is used by the runtimes build.
I'd like to eventually fully deprecate (1) and make (2) the only way since (1) is a maintenance nightmare: it doesn't use standard CMake logic, instead it invokes Clang directly as `add_custom_target`, has its own way of handling flags, etc.
https://github.com/llvm/llvm-project/pull/95304
More information about the llvm-commits
mailing list