This commit is contained in:
Ian A. Mason 2019-07-29 16:39:09 -07:00
commit 8fc18595bc

View File

@ -38,9 +38,9 @@ import (
"encoding/hex" "encoding/hex"
"fmt" "fmt"
"path" "path"
// issue #30: "path/filepath" "path/filepath"
"regexp" "regexp"
// issue #30: "strings" "strings"
) )
type parserResult struct { type parserResult struct {
@ -353,11 +353,10 @@ func getArtifactNames(pr parserResult, srcFileIndex int, hidden bool) (objBase s
srcFile := pr.InputFiles[srcFileIndex] srcFile := pr.InputFiles[srcFileIndex]
var _, baseNameWithExt = path.Split(srcFile) var _, baseNameWithExt = path.Split(srcFile)
// issue #30: main.cpp and main.c cause conflicts. // issue #30: main.cpp and main.c cause conflicts.
// var baseName = strings.TrimSuffix(baseNameWithExt, filepath.Ext(baseNameWithExt)) var baseName = strings.TrimSuffix(baseNameWithExt, filepath.Ext(baseNameWithExt))
var baseName = baseNameWithExt bcBase = fmt.Sprintf(".%s.o.bc", baseNameWithExt)
bcBase = fmt.Sprintf(".%s.o.bc", baseName)
if hidden { if hidden {
objBase = fmt.Sprintf(".%s.o", baseName) objBase = fmt.Sprintf(".%s.o", baseNameWithExt)
} else { } else {
objBase = fmt.Sprintf("%s.o", baseName) objBase = fmt.Sprintf("%s.o", baseName)
} }