[embedded] Make embedded target triples conditional on LLVM support #70218
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
LLVM might not be build with support for all architectures to save time. The changes in this commit check the value of LLVM_TARGETS_TO_BUILD provided by LLVMConfig.cmake to add or skip the different embedded targets if LLVM happens to not build with support for that target.
While x86_64 and ARM/AArch64 are very common in
LLVM_TARGETS_TO_BUILD
, targets like RISCV are more specialized and might not be always enabled.This is not a problem for builds using the
build-script
because of the changes introduced in #70057, but it is still a problem for other builds that do not usebuild-script
. This solution should work for any build.