-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sdk): enhance dev mode warning with opt-level detection
- Add opt-level detection in build script - Set environment variable when optimization level is low - Update warning message to be more visible with clear instructions - Replace debug_assertions check with opt-level detection Co-Authored-By: [email protected] <[email protected]>
- Loading branch information
1 parent
aa5d953
commit fec1195
Showing
2 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
fn main() { | ||
vergen::EmitBuilder::builder().build_timestamp().git_sha(true).emit().unwrap(); | ||
|
||
let opt_level = std::env::var("OPT_LEVEL").unwrap_or_else(|_| "0".to_string()); | ||
if opt_level == "0" || opt_level == "1" { | ||
println!("cargo:rustc-env=SP1_OPT_LEVEL_IS_LOW=1"); | ||
} | ||
} |
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