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

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

Merged
merged 15 commits into from
Sep 27, 2022

Conversation

celinval
Copy link
Contributor

@celinval celinval commented Sep 23, 2022

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
Copy link
Contributor

@zhassan-aws zhassan-aws left a comment

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).

.cargo/config.toml Outdated Show resolved Hide resolved
kani-compiler/src/main.rs Outdated Show resolved Hide resolved
name = "make-kani-release"
version = "0.1.0"
name = "build-kani"
version = "0.10.0"
Copy link
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
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.

tools/build-kani/src/sysroot.rs Outdated Show resolved Hide resolved
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
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.

kani-compiler/src/main.rs Outdated Show resolved Hide resolved
kani-compiler/src/main.rs Show resolved Hide resolved
tests/kani/Strings/copy_empty_string_by_intrinsic.rs Outdated Show resolved Hide resolved
tests/kani/Strings/copy_empty_string_by_intrinsic.rs Outdated Show resolved Hide resolved
tools/build-kani/src/sysroot.rs Outdated Show resolved Hide resolved
@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