ソースを参照

[tools/link-order] Sort objects so that compilation can be done in a fixed link order.

childerxxx 2 年 前
コミット
5e3622402d
1 ファイル変更9 行追加1 行削除
  1. 9 1
      tools/building.py

+ 9 - 1
tools/building.py

@@ -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)