]> git.lizzy.rs Git - rust.git/commitdiff
Initialize LLVM's AMDGPU target machine, if available.
authorRichard Diamond <wichard@vitalitystudios.com>
Thu, 14 Jun 2018 06:13:44 +0000 (01:13 -0500)
committerRichard Diamond <wichard@vitalitystudios.com>
Thu, 14 Jun 2018 06:18:10 +0000 (01:18 -0500)
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

index 07830d54d0c9e1bc83555caa297fbf178bfe3d51..741758cb954ba4b38e644c4644ddf57f2546e9cb 100644 (file)
@@ -331,6 +331,12 @@ fn init() { }
                  LLVMInitializeAArch64TargetMC,
                  LLVMInitializeAArch64AsmPrinter,
                  LLVMInitializeAArch64AsmParser);
+    init_target!(llvm_component = "amdgpu",
+                 LLVMInitializeAMDGPUTargetInfo,
+                 LLVMInitializeAMDGPUTarget,
+                 LLVMInitializeAMDGPUTargetMC,
+                 LLVMInitializeAMDGPUAsmPrinter,
+                 LLVMInitializeAMDGPUAsmParser);
     init_target!(llvm_component = "mips",
                  LLVMInitializeMipsTargetInfo,
                  LLVMInitializeMipsTarget,