cli,compiler: support emitting debug info in a file

This commit is contained in:
Evgenii Stratonikov 2020-04-02 15:38:53 +03:00
parent 5d3da26e1e
commit 5bdee683e6
3 changed files with 40 additions and 13 deletions

View file

@ -92,6 +92,10 @@ func NewCommands() []cli.Command {
Name: "debug, d",
Usage: "Debug mode will print out additional information after a compiling",
},
cli.StringFlag{
Name: "emitdebug",
Usage: "Emit debug info in a separate file",
},
},
},
{
@ -348,6 +352,8 @@ func contractCompile(ctx *cli.Context) error {
o := &compiler.Options{
Outfile: ctx.String("out"),
Debug: ctx.Bool("debug"),
DebugInfo: ctx.String("emitdebug"),
}
result, err := compiler.CompileAndSave(src, o)