@@ -43,8 +43,6 @@ use crate::codegen::yul::generate_yul_function_cfg;
4343use crate :: sema:: diagnostics:: Diagnostics ;
4444use crate :: sema:: eval:: eval_const_number;
4545use crate :: sema:: Recurse ;
46- #[ cfg( feature = "wasm_opt" ) ]
47- use contract_build:: OptimizationPasses ;
4846use num_bigint:: { BigInt , Sign } ;
4947use num_rational:: BigRational ;
5048use num_traits:: { FromPrimitive , Zero } ;
@@ -69,30 +67,6 @@ pub enum OptimizationLevel {
6967 Aggressive = 3 ,
7068}
7169
72- #[ cfg( feature = "llvm" ) ]
73- impl From < OptimizationLevel > for inkwell:: OptimizationLevel {
74- fn from ( level : OptimizationLevel ) -> Self {
75- match level {
76- OptimizationLevel :: None => inkwell:: OptimizationLevel :: None ,
77- OptimizationLevel :: Less => inkwell:: OptimizationLevel :: Less ,
78- OptimizationLevel :: Default => inkwell:: OptimizationLevel :: Default ,
79- OptimizationLevel :: Aggressive => inkwell:: OptimizationLevel :: Aggressive ,
80- }
81- }
82- }
83-
84- #[ cfg( feature = "llvm" ) ]
85- impl From < inkwell:: OptimizationLevel > for OptimizationLevel {
86- fn from ( level : inkwell:: OptimizationLevel ) -> Self {
87- match level {
88- inkwell:: OptimizationLevel :: None => OptimizationLevel :: None ,
89- inkwell:: OptimizationLevel :: Less => OptimizationLevel :: Less ,
90- inkwell:: OptimizationLevel :: Default => OptimizationLevel :: Default ,
91- inkwell:: OptimizationLevel :: Aggressive => OptimizationLevel :: Aggressive ,
92- }
93- }
94- }
95-
9670#[ derive( Clone , Debug , PartialEq ) ]
9771pub struct Options {
9872 pub dead_storage : bool ,
@@ -105,8 +79,6 @@ pub struct Options {
10579 pub log_api_return_codes : bool ,
10680 pub log_runtime_errors : bool ,
10781 pub log_prints : bool ,
108- #[ cfg( feature = "wasm_opt" ) ]
109- pub wasm_opt : Option < OptimizationPasses > ,
11082}
11183
11284impl Default for Options {
@@ -122,8 +94,6 @@ impl Default for Options {
12294 log_api_return_codes : false ,
12395 log_runtime_errors : false ,
12496 log_prints : true ,
125- #[ cfg( feature = "wasm_opt" ) ]
126- wasm_opt : None ,
12797 }
12898 }
12999}
0 commit comments