From b4d64b7b28038d7e4b0bc75f1d407d5382512996 Mon Sep 17 00:00:00 2001 From: Richard Diamond Date: Thu, 14 Jun 2018 01:13:44 -0500 Subject: [PATCH] Initialize LLVM's AMDGPU target machine, if available. Note this isn't useful, yet. More changes will be necessary to be able to actually codegen for this machine. As such, it is not enabled by default. This patch is on its own for the benefit of the reviewers. --- src/librustc_llvm/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index 07830d54d0c9e..741758cb954ba 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -331,6 +331,12 @@ pub fn initialize_available_targets() { LLVMInitializeAArch64TargetMC, LLVMInitializeAArch64AsmPrinter, LLVMInitializeAArch64AsmParser); + init_target!(llvm_component = "amdgpu", + LLVMInitializeAMDGPUTargetInfo, + LLVMInitializeAMDGPUTarget, + LLVMInitializeAMDGPUTargetMC, + LLVMInitializeAMDGPUAsmPrinter, + LLVMInitializeAMDGPUAsmParser); init_target!(llvm_component = "mips", LLVMInitializeMipsTargetInfo, LLVMInitializeMipsTarget,