Repository navigation
CMake: catch some recurring problems with LLVM configuration. - #21174
Conversation
Signed-off-by: Benoit Jacob <[email protected]>
benvanik
left a comment
There was a problem hiding this comment.
empty targets to build is not an error and should only be a warning - if building for SPIR-V, Metal, WebGPU, etc trimming the targets to build is a great way to shrink the compiler when you're never emitting native code.
Good point! How about this now? Moved inside the |
Signed-off-by: Benoit Jacob <[email protected]>
|
if that's where the error mostly hits then SGTM - I think otherwise it'd be a thing we'd want to shard out to the various plugins (CUDA codegen target should check that a CUDA target is enabled, ROCM that a ROCM, and then CPU like what you have here). |
|
Yeah I thought about other backends for a split second, but it was more complex, and this issue has bitten us at least 3 times already, each time on llvm-cpu. Also note that other backends like ROCm unconditionally populate the LLVM targets with what they need. LLVM-CPU is an outlier in how it relies on LLVM targets being well populated. |
This [discord thread](https://discord.com/channels/689900678990135345/1385756730796933360) is only the latest iteration of a recurring hard-to-diagnose bug that occurs when LLVM is improperly configured. The CMake changes here help diagnose that early. This PR also fixes an instance of that incorrect usage in our own JSON configuration file (thanks Scott for finding it). --------- Signed-off-by: Benoit Jacob <[email protected]>
This discord thread is only the latest iteration of a recurring hard-to-diagnose bug that occurs when LLVM is improperly configured. The CMake changes here help diagnose that early. This PR also fixes an instance of that incorrect usage in our own JSON configuration file (thanks Scott for finding it).