-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-FFIArea: Foreign function interface (FFI)Area: Foreign function interface (FFI)A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Description
E.g. one can import an intrinsic via
extern {
#[link_name = "llvm.sqrt.f32"]
fn sqrt(x: f32) -> f32;
}
AFAIK, LLVM doesn't have guarantees about the stability of intrinsics, so a library usable with Rust 1.0 that does the above may become unusable with Rust 1.x if LLVM is upgraded. Being chaine to a specific LLVM version would be really bad, so we should feature gate link_name
s that start with llvm.
.
(Tagging as E-mentor, since I'm happy to help. The relevant code is in syntax::feature_gate
.)
Metadata
Metadata
Assignees
Labels
A-FFIArea: Foreign function interface (FFI)Area: Foreign function interface (FFI)A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.