From df329a086c8ffc9ff37201d76b8199a70a5f28f9 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Mon, 6 Aug 2018 17:01:49 +0800 Subject: [PATCH] Add no-constructor params --- cli/build/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cli/build/main.rs b/cli/build/main.rs index 38df600..af97763 100644 --- a/cli/build/main.rs +++ b/cli/build/main.rs @@ -111,6 +111,9 @@ fn do_main() -> Result<(), Error> { .help("Preserves specific imports in the library") .takes_value(true) .long("public-api")) + .arg(Arg::with_name("no_constructor") + .help("Do not wrap with constructor but only save an optimized module") + .long("no-constructor")) .get_matches(); @@ -160,7 +163,7 @@ fn do_main() -> Result<(), Error> { let (module, ctor_module) = build( module, - true, + !matches.is_present("no_constructor"), source_input.target(), runtime_type_version, &public_api_entries,