Compiler defaults to .o when output name isn't specified
This commit is contained in:
parent
15e418d8c1
commit
00110039e2
|
@ -34,6 +34,9 @@ func (this *Compiler) CompileUnit (address entity.Address) error {
|
|||
// if the format isn't specified, try to get it from the filename
|
||||
// extension of the input. if that isn't specified, default to .o
|
||||
if this.Filetype == FiletypeUnknown {
|
||||
if this.Output == "" {
|
||||
this.Filetype = FiletypeObject
|
||||
} else {
|
||||
var ok bool
|
||||
this.Filetype, ok = FiletypeFromExt (
|
||||
*this.Target,
|
||||
|
@ -42,6 +45,7 @@ func (this *Compiler) CompileUnit (address entity.Address) error {
|
|||
this.Filetype = FiletypeObject
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if the output file is unspecified, generate a nickname from the
|
||||
// input address. if that doesn't work, default to "output"
|
||||
|
|
Loading…
Reference in New Issue