Skip to content

Commit 987fd3c

Browse files
committed
Make binaryen off-by-default
1 parent c23a95a commit 987fd3c

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

chisel/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ clap = "2.32.0"
1717
serde = "1.0.80"
1818
serde_derive = "1.0.80"
1919
serde_yaml = "0.8.7"
20+
21+
[dependencies.binaryen]
22+
libchisel = { path = "../libchisel", version = "0.4.0", features = "binaryen" }
23+
24+
[features]
25+
default = []

chisel/src/main.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ use std::fs::{read, read_to_string};
1010
use std::process;
1111

1212
use libchisel::{
13-
binaryenopt::*, checkstartfunc::*, deployer::*, remapimports::*, remapstart::*, repack::*,
14-
trimexports::*, trimstartfunc::*, verifyexports::*, verifyimports::*,
13+
checkstartfunc::*, deployer::*, remapimports::*, remapstart::*, repack::*, trimexports::*,
14+
trimstartfunc::*, verifyexports::*, verifyimports::*,
1515
};
1616

17+
#[cfg(feature = "binaryen")]
18+
use libchisel::binerynopt::*;
19+
1720
use clap::{App, Arg, ArgMatches, SubCommand};
1821
use libchisel::*;
1922
use parity_wasm::elements::{deserialize_buffer, serialize_to_file, Module, Serialize};
@@ -263,6 +266,7 @@ fn execute_module(context: &ModuleContext, module: &mut Module) -> bool {
263266
}
264267
}
265268
"repack" => translate_module(module, Repack::new()),
269+
#[cfg(feature = "binaryen")]
266270
"binaryenopt" => {
267271
is_translator = true;
268272
if let Ok(chisel) = BinaryenOptimiser::with_preset(&preset) {

libchisel/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ byteorder = "1.2.4"
1717
binaryen = { version = "0.8", optional = true }
1818

1919
[features]
20-
default = ["binaryen"]
20+
default = []

0 commit comments

Comments
 (0)