File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
compiler/rustc_target/src Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -923,6 +923,28 @@ impl Target {
923923 _ => unreachable ! ( ) ,
924924 }
925925 }
926+ "loongarch64" => {
927+ // LoongArch handles ABI in a very sane way, being fully explicit via `llvm_abiname`
928+ // about what the intended ABI is.
929+ match & * self . llvm_abiname {
930+ "ilp32d" | "lp64d" => {
931+ // Requires d (which implies f), incompatible with nothing.
932+ FeatureConstraints { required : & [ "d" ] , incompatible : & [ ] }
933+ }
934+ "ilp32f" | "lp64f" => {
935+ // Requires f, incompatible with nothing.
936+ FeatureConstraints { required : & [ "f" ] , incompatible : & [ ] }
937+ }
938+ "ilp32s" | "lp64s" => {
939+ // The soft-float ABI does not require any features and is also not
940+ // incompatible with any features. Rust targets explicitly specify the
941+ // LLVM ABI names, which allows for enabling hard-float support even on
942+ // soft-float targets, and ensures that the ABI behavior is as expected.
943+ NOTHING
944+ }
945+ _ => unreachable ! ( ) ,
946+ }
947+ }
926948 _ => NOTHING ,
927949 }
928950 }
You can’t perform that action at this time.
0 commit comments