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 "kani" configuration key to enable conditional compilation in build scripts #2297

Merged
merged 7 commits into from
Jul 8, 2023

Conversation

celinval
Copy link
Contributor

Description of changes:

We now pass --cfg=kani to build scripts, which allow users to use constructs such as if cfg!(kani) to conditionally compile their build scripts.

The build script may have logic that is not redundant to Kani, or even unsupported. Users can now change how their build works based on conditional compilation.

Resolved issues:

N/A

Related RFC:

Optional #ISSUE-NUMBER.

Call-outs:

Testing:

  • How is this change tested? New test

  • Is this a refactor change? No

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 March 10, 2023 22:39
@celinval celinval enabled auto-merge (squash) March 10, 2023 22:39
@celinval celinval marked this pull request as draft March 10, 2023 22:58
auto-merge was automatically disabled March 10, 2023 22:58

Pull request was converted to draft

@celinval
Copy link
Contributor Author

There is one issue with this change is that we require nightly cargo since this is a unstable feature. However, we invoke whatever cargo is in the system. I.e.: I'll need to change our code to invoke the cargo we install.

@karkhaz karkhaz requested review from karkhaz and a team and removed request for karkhaz April 3, 2023 11:54
Also add support to the playback command and use a script to test
the fix. Inside the Kani test folder, rustup will pick up the version
from our toolchain configuration file.
@celinval celinval marked this pull request as ready for review July 4, 2023 20:41
@celinval celinval enabled auto-merge (squash) July 6, 2023 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants