diff options
| author | Dirreke <mingyang_ge@163.com> | 2023-07-13 22:19:59 +0800 |
|---|---|---|
| committer | dirreke <mingyang_ge@163.com> | 2023-08-14 23:02:36 +0800 |
| commit | d16409fe228f07c8a702ace7b42c1e1196ff85e6 (patch) | |
| tree | 3e8ff9bcf8ce8a8cccd58511150bc24adff55301 /compiler/rustc_llvm | |
| parent | 3071e0aef6dfd0a150c3fb1da0abad4ec86ca0aa (diff) | |
| download | rust-d16409fe228f07c8a702ace7b42c1e1196ff85e6.tar.gz rust-d16409fe228f07c8a702ace7b42c1e1196ff85e6.zip | |
add a csky-unknown-linux-gnuabiv2 target
Diffstat (limited to 'compiler/rustc_llvm')
| -rw-r--r-- | compiler/rustc_llvm/build.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 7 | ||||
| -rw-r--r-- | compiler/rustc_llvm/src/lib.rs | 8 |
3 files changed, 16 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs index aa1121d6bb3..4302b161833 100644 --- a/compiler/rustc_llvm/build.rs +++ b/compiler/rustc_llvm/build.rs @@ -12,6 +12,7 @@ const OPTIONAL_COMPONENTS: &[&str] = &[ "avr", "loongarch", "m68k", + "csky", "mips", "powerpc", "systemz", diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index b3371dbe834..b566ea496de 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -105,6 +105,12 @@ extern "C" void LLVMTimeTraceProfilerFinish(const char* FileName) { #define SUBTARGET_M68K #endif +#ifdef LLVM_COMPONENT_CSKY +#define SUBTARGET_CSKY SUBTARGET(CSKY) +#else +#define SUBTARGET_CSKY +#endif + #ifdef LLVM_COMPONENT_MIPS #define SUBTARGET_MIPS SUBTARGET(Mips) #else @@ -159,6 +165,7 @@ extern "C" void LLVMTimeTraceProfilerFinish(const char* FileName) { SUBTARGET_AARCH64 \ SUBTARGET_AVR \ SUBTARGET_M68K \ + SUBTARGET_CSKY \ SUBTARGET_MIPS \ SUBTARGET_PPC \ SUBTARGET_SYSTEMZ \ diff --git a/compiler/rustc_llvm/src/lib.rs b/compiler/rustc_llvm/src/lib.rs index a49ded4fd7b..eb70961503d 100644 --- a/compiler/rustc_llvm/src/lib.rs +++ b/compiler/rustc_llvm/src/lib.rs @@ -103,6 +103,14 @@ pub fn initialize_available_targets() { LLVMInitializeM68kAsmParser ); init_target!( + llvm_component = "csky", + LLVMInitializeCSKYTargetInfo, + LLVMInitializeCSKYTarget, + LLVMInitializeCSKYTargetMC, + LLVMInitializeCSKYAsmPrinter, + LLVMInitializeCSKYAsmParser + ); + init_target!( llvm_component = "loongarch", LLVMInitializeLoongArchTargetInfo, LLVMInitializeLoongArchTarget, |
