mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 04:21:21 +00:00
Remove debug sections by default
The changes on master Rust insert debug sections now (yay!) but this means that wasm binaries by default pick up debug sections from the standard library, so let's remove them by default in wasm-bindgen unless `--debug` is passed
This commit is contained in:
@ -32,6 +32,7 @@ Options:
|
||||
--no-typescript Don't emit a *.d.ts file
|
||||
--debug Include otherwise-extraneous debug checks in output
|
||||
--no-demangle Don't demangle Rust symbol names
|
||||
--keep-debug Keep debug sections in wasm files
|
||||
-V --version Print the version number of wasm-bindgen
|
||||
";
|
||||
|
||||
@ -47,6 +48,7 @@ struct Args {
|
||||
flag_version: bool,
|
||||
flag_no_demangle: bool,
|
||||
flag_no_modules_global: Option<String>,
|
||||
flag_keep_debug: bool,
|
||||
arg_input: Option<PathBuf>,
|
||||
}
|
||||
|
||||
@ -85,6 +87,7 @@ fn rmain(args: &Args) -> Result<(), Error> {
|
||||
.no_modules(args.flag_no_modules)
|
||||
.debug(args.flag_debug)
|
||||
.demangle(!args.flag_no_demangle)
|
||||
.keep_debug(args.flag_keep_debug)
|
||||
.typescript(typescript);
|
||||
if let Some(ref name) = args.flag_no_modules_global {
|
||||
b.no_modules_global(name);
|
||||
|
Reference in New Issue
Block a user