mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-23 23:23:50 +03:00
fix incorrect argument parsing in leo build
This commit is contained in:
parent
6a2ebfc22e
commit
f245937ef9
@ -17,7 +17,7 @@
|
|||||||
///
|
///
|
||||||
/// Toggles compiler optimizations on the program.
|
/// Toggles compiler optimizations on the program.
|
||||||
///
|
///
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct CompilerOptions {
|
pub struct CompilerOptions {
|
||||||
pub canonicalization_enabled: bool,
|
pub canonicalization_enabled: bool,
|
||||||
pub constant_folding_enabled: bool,
|
pub constant_folding_enabled: bool,
|
||||||
|
@ -59,10 +59,10 @@ pub struct BuildOptions {
|
|||||||
impl Default for BuildOptions {
|
impl Default for BuildOptions {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
disable_canonicalization: true,
|
disable_canonicalization: false,
|
||||||
disable_constant_folding: true,
|
disable_constant_folding: false,
|
||||||
disable_code_elimination: true,
|
disable_code_elimination: false,
|
||||||
disable_all_optimizations: true,
|
disable_all_optimizations: false,
|
||||||
enable_all_ast_snapshots: false,
|
enable_all_ast_snapshots: false,
|
||||||
enable_initial_ast_snapshot: false,
|
enable_initial_ast_snapshot: false,
|
||||||
enable_canonicalized_ast_snapshot: false,
|
enable_canonicalized_ast_snapshot: false,
|
||||||
@ -73,11 +73,11 @@ impl Default for BuildOptions {
|
|||||||
|
|
||||||
impl From<BuildOptions> for CompilerOptions {
|
impl From<BuildOptions> for CompilerOptions {
|
||||||
fn from(options: BuildOptions) -> Self {
|
fn from(options: BuildOptions) -> Self {
|
||||||
if !options.disable_all_optimizations {
|
if options.disable_all_optimizations {
|
||||||
CompilerOptions {
|
CompilerOptions {
|
||||||
canonicalization_enabled: true,
|
canonicalization_enabled: false,
|
||||||
constant_folding_enabled: true,
|
constant_folding_enabled: false,
|
||||||
dead_code_elimination_enabled: true,
|
dead_code_elimination_enabled: false,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CompilerOptions {
|
CompilerOptions {
|
||||||
|
Loading…
Reference in New Issue
Block a user