Browse Source

Revert previous change to build.go for now - should fix build

Signed-off-by: Graham MacDonald <grahamamacdonald@gmail.com>
Graham MacDonald 5 years ago
parent
commit
636ebd8edb
1 changed files with 3 additions and 29 deletions
  1. 3 29
      util/src/harvey/cmd/build/build.go

+ 3 - 29
util/src/harvey/cmd/build/build.go

@@ -59,7 +59,6 @@ import (
 	"path"
 	"path/filepath"
 	"regexp"
-	"sort"
 	"strings"
 )
 
@@ -126,8 +125,6 @@ func globby(s []string) []string {
 	for n := range f {
 		all = append(all, n)
 	}
-	sort.Strings(all)
-
 	debug("Glob of '%v' is '%v'", s, all)
 	return all
 }
@@ -226,15 +223,7 @@ func include(f string, targ string, b *build) {
 	var builds buildfile
 	fail(json.Unmarshal(d, &builds))
 
-	// Sort keys so we can guaranteed order of iteration over builds
-	var buildkeys []string
-	for n := range builds {
-		buildkeys = append(buildkeys, n)
-	}
-	sort.Strings(buildkeys)
-
-	for _, n := range buildkeys {
-		build := builds[n]
+	for _, build := range builds {
 		t := target(&build)
 		if t != "" {
 			targ = t
@@ -242,9 +231,7 @@ func include(f string, targ string, b *build) {
 		}
 	}
 
-	for _, n := range buildkeys {
-		build := builds[n]
-
+	for n, build := range builds {
 		log.Printf("Merging %s", n)
 		b.Cflags = append(b.Cflags, build.Cflags...)
 		b.Oflags = append(b.Oflags, build.Oflags...)
@@ -324,17 +311,7 @@ func process(f string, r []*regexp.Regexp) []build {
 	d, err := ioutil.ReadFile(f)
 	fail(err)
 	fail(json.Unmarshal(d, &builds))
-
-	// Sort keys so we can guaranteed order of iteration over builds
-	var buildkeys []string
-	for n := range builds {
-		buildkeys = append(buildkeys, n)
-	}
-	sort.Strings(buildkeys)
-
-	for _, n := range buildkeys {
-		build := builds[n]
-
+	for n, build := range builds {
 		build.name = n
 		build.jsons = make(map[string]bool)
 		skip := true
@@ -660,9 +637,6 @@ func project(bf string, which []*regexp.Regexp) {
 }
 
 func main() {
-	// Disable logging timestamps - easier to compare build output
-	log.SetFlags(0)
-
 	// A small amount of setup is done in the paths*.go files. They are
 	// OS-specific path setup/manipulation. "harvey" is set there and $PATH is
 	// adjusted.