summaryrefslogtreecommitdiff
path: root/tools/building.py
diff options
context:
space:
mode:
authorchilderxxx <[email protected]>2022-09-10 15:05:35 +0800
committerguo <[email protected]>2022-09-11 17:50:39 +0800
commit5e3622402d37e3d0c14d67fcb2dacb8a7b4bce5f (patch)
treedb5ca389c0e78e3ef0cf88a45438145aa4b6ed83 /tools/building.py
parentffe1c5724076084459fcebca32a1b3c9e17ec9d1 (diff)
[tools/link-order] Sort objects so that compilation can be done in a fixed link order.
Diffstat (limited to 'tools/building.py')
-rw-r--r--tools/building.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/building.py b/tools/building.py
index d9fecd1567..680c6a55ab 100644
--- a/tools/building.py
+++ b/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)