Skip to content

Add flag to the compiler to build std library (no user visible change)#2676

Merged
celinval merged 3 commits intomodel-checking:mainfrom
celinval:issue-xxxx-build-std
Aug 15, 2023
Merged

Add flag to the compiler to build std library (no user visible change)#2676
celinval merged 3 commits intomodel-checking:mainfrom
celinval:issue-xxxx-build-std

Conversation

@celinval
Copy link
Copy Markdown
Contributor

@celinval celinval commented Aug 11, 2023

Description of changes:

Parts of the compiler relies on the existence of some constructs that are available in the standard library and Kani library. However, they aren't available when we are actually building the standard library (std-lib-regression.sh) and the Kani libraries (when building the sysroot with cargo build-dev).

Thus, we introduce a flag to inform the compiler that we are currently building the standard library. This flag can then be used to properly enable / disable sysroot dependent code.

Resolved issues:

N/A

Related RFC:

Call-outs:

This is related to the bitmask work.

Testing:

  • How is this change tested? Existing tests

  • Is this a refactor change?

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.

When building the standard library, we cannot assume that Kani elements
or standard library elements are available. This flag allow us to
control that.
@celinval celinval requested a review from a team as a code owner August 11, 2023 23:46
@celinval celinval mentioned this pull request Aug 11, 2023
4 tasks
@zhassan-aws
Copy link
Copy Markdown
Contributor

I'm not sure I see what this change is doing. Can you expand the description and/or the comments in the code to clarify?

@celinval
Copy link
Copy Markdown
Contributor Author

I'm not sure I see what this change is doing. Can you expand the description and/or the comments in the code to clarify?

I updated the description. Let me know if that makes sense now.

@zhassan-aws
Copy link
Copy Markdown
Contributor

Yes, it does. Thanks!

@celinval celinval enabled auto-merge (squash) August 15, 2023 05:38
@celinval celinval merged commit 4ca66eb into model-checking:main Aug 15, 2023
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.

2 participants