-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathxmake.diff
More file actions
21 lines (21 loc) · 893 Bytes
/
xmake.diff
File metadata and controls
21 lines (21 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
@@ -28,11 +28,15 @@ function main(jobgraph, target, opt)
jobgraph:group(objects_group, function ()
build_object(jobgraph, target, opt)
end)
- if jobgraph:size() > jobsize then
- local link_group = target:fullname() .. "/link"
- jobgraph:group(link_group, function ()
- target_buildutils.add_linkjobs(jobgraph, target, opt)
- end)
+ local has_object_jobs = jobgraph:size() > jobsize
+
+ -- @note We always need the link task, even if the current target does not have any object files
+ -- https://github.com/xmake-io/xmake-repo/pull/7479#issuecomment-3007049158
+ local link_group = target:fullname() .. "/link"
+ jobgraph:group(link_group, function ()
+ target_buildutils.add_linkjobs(jobgraph, target, opt)
+ end)
+ if has_object_jobs then
jobgraph:add_orders(objects_group, link_group)
end
end