-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for storing code model to LLVM module IR #83044
Conversation
This patch avoids undefined behavior by linking different object files. Also this would it could be propagated properly to LTO. See https://reviews.llvm.org/D52322 and https://reviews.llvm.org/D52323. This patch is based on rust-lang#74002
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
src/test/codegen/codemodels.rs
Outdated
// revisions: NOMODEL MODEL-SMALL MODEL-KERNEL MODEL-MEDIUM MODEL-LARGE | ||
//[NOMODEL] compile-flags: | ||
//[MODEL-SMALL] compile-flags: -C code-model=small | ||
//[MODEL-KERNEL] compile-flags: --target x86_64-unknown-linux-gnu -C code-model=kernel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure this is going to fail because not all builder have an x86_64-unknown-linux-gnu target (in particular, those where this is not the host target).
You need to either make this test only-x86_64
, or drop the kernel code model part of the test, if that's not portable to other targets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an alternative option of using:
// needs-llvm-components:
together with a #[no_core]
example.
@bors r+ rollup |
📌 Commit 2feccf0 has been approved by |
Add support for storing code model to LLVM module IR This patch avoids undefined behavior by linking different object files. Also this would it could be propagated properly to LTO. See https://reviews.llvm.org/D52322 and https://reviews.llvm.org/D52323. This patch is based on rust-lang#74002
Failed in rollup: #83063 (comment) |
2feccf0
to
7141838
Compare
@bors r+ |
📌 Commit 7141838 has been approved by |
☀️ Test successful - checks-actions |
This patch avoids undefined behavior by linking different object files.
Also this would it could be propagated properly to LTO.
See https://reviews.llvm.org/D52322 and https://reviews.llvm.org/D52323.
This patch is based on #74002