fix linking stage arguments order

This commit is contained in:
Loic Gelle 2017-06-22 15:59:19 -07:00
parent 3eedff25c7
commit b0014b15be

View File

@ -127,8 +127,8 @@ func linkFiles(compilerExecName string, pr ParserResult, objFiles []string) {
if outputFile == "" {
outputFile = "a.out"
}
args := append(pr.ObjectFiles, objFiles...)
args = append(args, pr.LinkArgs...)
args := append(pr.ObjectFiles, pr.LinkArgs...)
args = append(args, objFiles...)
args = append(args, "-o", outputFile)
if execCmd(compilerExecName, args) {
log.Fatal("Failed to link.")