mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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/8651 Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
parent
3cfae34943
commit
3b1d0d0f07
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue