fix incorrect argument parsing in leo build

This commit is contained in:
damirka 2021-07-22 16:10:36 +03:00
parent 6a2ebfc22e
commit f245937ef9
2 changed files with 9 additions and 9 deletions

View File

@ -17,7 +17,7 @@
///
/// Toggles compiler optimizations on the program.
///
#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct CompilerOptions {
pub canonicalization_enabled: bool,
pub constant_folding_enabled: bool,

View File

@ -59,10 +59,10 @@ pub struct BuildOptions {
impl Default for BuildOptions {
fn default() -> Self {
Self {
disable_canonicalization: true,
disable_constant_folding: true,
disable_code_elimination: true,
disable_all_optimizations: true,
disable_canonicalization: false,
disable_constant_folding: false,
disable_code_elimination: false,
disable_all_optimizations: false,
enable_all_ast_snapshots: false,
enable_initial_ast_snapshot: false,
enable_canonicalized_ast_snapshot: false,
@ -73,11 +73,11 @@ impl Default for BuildOptions {
impl From<BuildOptions> for CompilerOptions {
fn from(options: BuildOptions) -> Self {
if !options.disable_all_optimizations {
if options.disable_all_optimizations {
CompilerOptions {
canonicalization_enabled: true,
constant_folding_enabled: true,
dead_code_elimination_enabled: true,
canonicalization_enabled: false,
constant_folding_enabled: false,
dead_code_elimination_enabled: false,
}
} else {
CompilerOptions {