Skip to content

Build custom sysroot with --always-encode-mir on#1717

Merged
celinval merged 15 commits into
model-checking:mainfrom
celinval:issue-1605-sysbuild
Sep 27, 2022
Merged

Build custom sysroot with --always-encode-mir on#1717
celinval merged 15 commits into
model-checking:mainfrom
celinval:issue-1605-sysbuild

Conversation

@celinval

@celinval celinval commented Sep 23, 2022

Copy link
Copy Markdown
Contributor

Description of changes:

This change builds a custom sysroot for Kani. This new sysroot will contain a "lib/" folder with Kani libraries as well as the standard libraries compiled with --always-encode-mir. This enable us to fully traverse the std MIR and fix the missing functions errors.

Other changes to the build were described in the issue here: #1605 (comment)

Resolved issues:

Resolves #1605
Resolves #241

Related RFC:

Tracking issue #1588 .

Call-outs:

I'm still fixing all the workflows, but I could use some early feedback.

Testing:

  • How is this change tested? New tests

  • Is this a refactor change? Kinda

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@celinval celinval requested a review from a team as a code owner September 23, 2022 17:25

@zhassan-aws zhassan-aws left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR changes are quite big! Might help to break this up into multiple PRs (e.g. may want to have a first PR that updates the make-kani-release tool).

Comment thread .cargo/config.toml Outdated
Comment thread kani-compiler/src/main.rs Outdated
Comment thread tools/build-kani/Cargo.toml Outdated
name = "make-kani-release"
version = "0.1.0"
name = "build-kani"
version = "0.10.0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.11.0?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I need to update my branch.

Comment thread tools/build-kani/src/sysroot.rs Outdated
The size of the bundle did increase quite a bit on my linux machine. It
went from 24MB to 67MB.

This is still pretty far from GitHub's max size of 2GB:
https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases#storage-and-bandwidth-quotas
@celinval

Copy link
Copy Markdown
Contributor Author

The PR changes are quite big! Might help to break this up into multiple PRs (e.g. may want to have a first PR that updates the make-kani-release tool).

I would really like to break this PR down, but I'm afraid the regression won't pass if I do.

Comment thread kani-compiler/src/main.rs
Comment thread kani-compiler/src/main.rs
Comment thread tests/kani/Strings/copy_empty_string_by_intrinsic.rs Outdated
Comment thread tests/kani/Strings/copy_empty_string_by_intrinsic.rs Outdated
Comment thread tools/build-kani/src/sysroot.rs Outdated
@celinval celinval merged commit 5539c0d into model-checking:main Sep 27, 2022
celinval added a commit to celinval/kani-dev that referenced this pull request Sep 29, 2022
After model-checking#1717 was merged, users need to run `cargo build-dev` to build
Kani binaries and the sysroot.
celinval added a commit that referenced this pull request Sep 29, 2022
After #1717 was merged, users need to run `cargo build-dev` to build
Kani binaries and the sysroot.
@celinval celinval linked an issue Sep 30, 2022 that may be closed by this pull request
@celinval celinval mentioned this pull request Oct 18, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ship custom sysroot Build custom sysroot Failure to cast back to &str from &[u8]

3 participants