Skip to content

Commit ca28640

Browse files
committed
Sort object files alphabetically
This solves arduino/Arduino#7278, making the build process deterministic.
1 parent 748c70d commit ca28640

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

builder_utils/utils.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import (
3434
"os"
3535
"os/exec"
3636
"path/filepath"
37+
"sort"
3738
"strconv"
3839
"strings"
3940
"sync"
@@ -200,6 +201,8 @@ func compileFilesWithRecipe(ctx *types.Context, objectFiles []string, sourcePath
200201
for objectFile := range objectFilesChan {
201202
objectFiles = append(objectFiles, objectFile)
202203
}
204+
// sort object files alphabetically
205+
sort.Strings(objectFiles)
203206
return objectFiles, nil
204207
}
205208
}

0 commit comments

Comments
 (0)