Skip to content
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

Merged
merged 2 commits into from
Mar 14, 2021

Conversation

kubo39
Copy link
Contributor

@kubo39 kubo39 commented Mar 12, 2021

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

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
@rust-highfive
Copy link
Collaborator

r? @estebank

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 12, 2021
// 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
Copy link
Contributor

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.

Copy link
Member

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.

@nikic
Copy link
Contributor

nikic commented Mar 12, 2021

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 12, 2021

📌 Commit 2feccf0 has been approved by nikic

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 12, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Mar 12, 2021
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
@JohnTitor
Copy link
Member

Failed in rollup: #83063 (comment)
This is platform-dependent so should be iffy, I think.
@bors r- rollup=iffy

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 13, 2021
@kubo39 kubo39 force-pushed the set-llvm-code-model branch from 2feccf0 to 7141838 Compare March 13, 2021 16:46
@nikic
Copy link
Contributor

nikic commented Mar 13, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Mar 13, 2021

📌 Commit 7141838 has been approved by nikic

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 13, 2021
@bors
Copy link
Contributor

bors commented Mar 14, 2021

⌛ Testing commit 7141838 with merge 84c08f8...

@bors
Copy link
Contributor

bors commented Mar 14, 2021

☀️ Test successful - checks-actions
Approved by: nikic
Pushing 84c08f8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 14, 2021
@bors bors merged commit 84c08f8 into rust-lang:master Mar 14, 2021
@rustbot rustbot added this to the 1.52.0 milestone Mar 14, 2021
@kubo39 kubo39 deleted the set-llvm-code-model branch March 14, 2021 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants