Commit 3b1d0d0f authored by Rob Pike's avatar Rob Pike

cmd/asm: remove object file if assembly fails.

Just an oversight. Plus the code had an unnecessary call to os.Exit
that now has a purpose.

Fixes #10372.

Change-Id: I456018f3a01ca05b4501c7f8a4961d48ab8c5e16
Reviewed-on: https://go-review.googlesource.com/8651Reviewed-by: 's avatarMinux Ma <minux@golang.org>
parent 3cfae349
......@@ -57,7 +57,8 @@ func main() {
var ok bool
pList.Firstpc, ok = parser.Parse()
if !ok {
log.Fatalf("asm: assembly of %s failed", flag.Arg(0))
log.Printf("asm: assembly of %s failed", flag.Arg(0))
os.Remove(*flags.OutputFile)
os.Exit(1)
}
obj.Writeobjdirect(ctxt, output)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment