================ @@ -198,13 +199,20 @@ static int PrintSupportedExtensions(std::string TargetStr) { std::unique_ptr<llvm::TargetMachine> TheTargetMachine( TheTarget->createTargetMachine(TargetStr, "", "", Options, std::nullopt)); const llvm::Triple &MachineTriple = TheTargetMachine->getTargetTriple(); + const llvm::MCSubtargetInfo *MCInfo = TheTargetMachine->getMCSubtargetInfo(); ---------------- DavidSpickett wrote:
I was wrong, clang doesn't recognise the triple if it wasn't enabled: ``` $ ./bin/clang --target=riscv64-linux-gnu --print-support clang version 18.0.0 (https://github.com/llvm/llvm-project.git ebefe83c092e41d243829ab812bb650674e2f3d2) Target: riscv64-unknown-linux-gnu Thread model: posix InstalledDir: /home/david.spickett/build-llvm-aarch64/./bin No available targets are compatible with triple "riscv64-unknown-linux-gnu" ``` So we won't get to this code if the target backend is missing. No worries :) https://github.com/llvm/llvm-project/pull/66715 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits