Fix the order of the arguments in the linking step.

This commit is contained in:
Ian A Mason 2017-07-24 06:53:49 -07:00
parent 8545a49940
commit 026fc69d24

View File

@ -181,8 +181,10 @@ func compileTimeLinkFiles(compilerExecName string, pr parserResult, objFiles []s
if outputFile == "" {
outputFile = "a.out"
}
args := pr.LinkArgs
args = append(args, objFiles...)
args := objFiles
for _, larg := range pr.LinkArgs {
args = append(args, larg)
}
args = append(args, "-o", outputFile)
success, err := execCmd(compilerExecName, args, "")
if !success {