-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade verus to support v1.82. * Cleanup build.rs * Set verus lib and tool to the rev supporting v1.82 Signed-off-by: Ziqiao Zhou <[email protected]> * Move vstd.verus.rs to verus vstd & mark memory-related as external * memory related verification needs to add a memory permission and will do it later Signed-off-by: Ziqiao Zhou <[email protected]> * Revert unnecessary change after verus upgrade * revert rust version * revert some code due to version change Signed-off-by: Ziqiao Zhou <[email protected]> * fmt --------- Signed-off-by: Ziqiao Zhou <[email protected]>
- Loading branch information
1 parent
9880bdf
commit c74be0a
Showing
12 changed files
with
59 additions
and
112 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,27 +4,17 @@ | |
// | ||
// Author: Joerg Roedel <[email protected]> | ||
|
||
use rustc_version::{Channel, Version}; | ||
|
||
fn main() { | ||
let rust_version = rustc_version::version_meta().unwrap(); | ||
// Check if the version is nightly and higher than 1.78.0 | ||
let is_expected_version = rust_version.semver >= Version::new(1, 78, 0); | ||
if !is_expected_version { | ||
if rust_version.channel == Channel::Nightly { | ||
// Print the cargo:rustc-cfg directive to enable the feature | ||
println!("cargo:rustc-cfg=RUST_BEFORE_1_78"); | ||
} else { | ||
// Optionally handle the case for non-nightly versions | ||
panic!("Requires the nightly version or stable version >= 1.78."); | ||
} | ||
} else { | ||
// Extra cfgs | ||
println!("cargo::rustc-check-cfg=cfg(fuzzing)"); | ||
println!("cargo::rustc-check-cfg=cfg(test_in_svsm)"); | ||
println!("cargo::rustc-check-cfg=cfg(verus_keep_ghost)"); | ||
println!("cargo::rustc-check-cfg=cfg(RUST_BEFORE_1_78)"); | ||
// Verification tool only support rust version lower than 1.82 | ||
// If new features are used, may need to disable them until verus is upraded. | ||
if rustc_version::version_meta().unwrap().semver > rustc_version::Version::new(1, 80, 2) { | ||
println!("cargo:rustc-cfg=RUST_VERSION_AFTER_VERUS"); | ||
} | ||
// Extra cfgs | ||
println!("cargo::rustc-check-cfg=cfg(fuzzing)"); | ||
println!("cargo::rustc-check-cfg=cfg(test_in_svsm)"); | ||
println!("cargo::rustc-check-cfg=cfg(verus_keep_ghost)"); | ||
println!("cargo::rustc-check-cfg=cfg(RUST_VERSION_AFTER_VERUS)"); | ||
|
||
// Stage 2 | ||
println!("cargo:rustc-link-arg-bin=stage2=-nostdlib"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,6 @@ | |
// Author: Nicolai Stange <[email protected]> | ||
|
||
#![no_std] | ||
#![cfg_attr(RUST_BEFORE_1_78, feature(offset_of))] // stable feature after v1.78 but nightly feature in v1.77 | ||
#![cfg_attr(RUST_BEFORE_1_78, feature(inline_const))] // stable feature in v1.78 but nightly feature in v1.77 | ||
#![cfg_attr(all(test, test_in_svsm), no_main)] | ||
#![cfg_attr(all(test, test_in_svsm), feature(custom_test_frameworks))] | ||
#![cfg_attr(all(test, test_in_svsm), test_runner(crate::testing::svsm_test_runner))] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.