[tools/link-order] Sort objects so that compilation can be done in a fixed link order.
@@ -775,8 +775,16 @@ def DoBuilding(target, objects):
objects.remove(obj)
# re-add the source files to the objects
+
+ objects_in_group = []
for group in Projects:
- local_group(group, objects)
+ local_group(group, objects_in_group)
+
+ # sort seperately, because the data type of
+ # the members of the two lists are different
+ objects_in_group = sorted(objects_in_group)
+ objects = sorted(objects)
+ objects.append(objects_in_group)
program = Env.Program(target, objects)
