diff options
| author | ruki <[email protected]> | 2025-03-29 22:32:11 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-04-08 15:31:56 +0800 |
| commit | 92d6126d1c98c9c58d38f5b173d7248a1e882d20 (patch) | |
| tree | 69849e9f0f9ac37e2bdcee00c8f5d279ee474e01 | |
| parent | 4b47fa99489e59337b056e0c95b50493c050fe32 (diff) | |
enable more build.object to jobgraph
| -rw-r--r-- | xmake/modules/private/action/build/object.lua | 8 | ||||
| -rw-r--r-- | xmake/rules/asm/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/cuda/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/dlang/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/objc++/xmake.lua | 4 | ||||
| -rw-r--r-- | xmake/rules/swift/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/winsdk/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/zig/xmake.lua | 2 |
8 files changed, 12 insertions, 12 deletions
diff --git a/xmake/modules/private/action/build/object.lua b/xmake/modules/private/action/build/object.lua index 8f71f4b68..5118dbb82 100644 --- a/xmake/modules/private/action/build/object.lua +++ b/xmake/modules/private/action/build/object.lua @@ -173,10 +173,10 @@ function _add_jobgraph(target, jobgraph, sourcebatch, opt) end end -function main(target, jobs, sourcebatch, opt) - if jobs.add_orders then - _add_jobgraph(target, jobs, sourcebatch, opt) +function main(target, jobgraph, sourcebatch, opt) + if jobgraph.add_orders then + _add_jobgraph(target, jobgraph, sourcebatch, opt) else - _add_batchjobs(target, jobs, sourcebatch, opt) + _add_batchjobs(target, jobgraph, sourcebatch, opt) end end diff --git a/xmake/rules/asm/xmake.lua b/xmake/rules/asm/xmake.lua index 78b693137..1c6743793 100644 --- a/xmake/rules/asm/xmake.lua +++ b/xmake/rules/asm/xmake.lua @@ -21,7 +21,7 @@ -- define rule: asm.build rule("asm.build") set_sourcekinds("as") - on_build_files("private.action.build.object", {batch = true}) + on_build_files("private.action.build.object", {jobgraph = true, batch = true}) -- define rule: asm rule("asm") diff --git a/xmake/rules/cuda/xmake.lua b/xmake/rules/cuda/xmake.lua index 334f569f1..4ce6699ff 100644 --- a/xmake/rules/cuda/xmake.lua +++ b/xmake/rules/cuda/xmake.lua @@ -22,7 +22,7 @@ rule("cuda.build") set_sourcekinds("cu") add_deps("cuda.build.devlink") - on_build_files("private.action.build.object", {batch = true}) + on_build_files("private.action.build.object", {jobgraph = true, batch = true}) on_config(function (target) -- https://github.com/xmake-io/xmake/issues/4755 local cu_ccbin = target:tool("cu-ccbin") diff --git a/xmake/rules/dlang/xmake.lua b/xmake/rules/dlang/xmake.lua index 7ffb8c42f..f5e741f7a 100644 --- a/xmake/rules/dlang/xmake.lua +++ b/xmake/rules/dlang/xmake.lua @@ -21,7 +21,7 @@ rule("dlang.build") set_sourcekinds("dc") add_deps("dlang.build.optimization") - on_build_files("private.action.build.object", {batch = true}) + on_build_files("private.action.build.object", {jobgraph = true, batch = true}) on_load(function (target) local toolchains = target:get("toolchains") or get_config("toolchain") if not toolchains or not table.contains(table.wrap(toolchains), "dlang", "dmd", "ldc", "gdc") then diff --git a/xmake/rules/objc++/xmake.lua b/xmake/rules/objc++/xmake.lua index c653261e7..3714ddf3f 100644 --- a/xmake/rules/objc++/xmake.lua +++ b/xmake/rules/objc++/xmake.lua @@ -31,7 +31,7 @@ rule("objc.build") target:add("frameworks", "Foundation", "CoreFoundation") end end) - on_build_files("private.action.build.object", {batch = true, distcc = true}) + on_build_files("private.action.build.object", {jobgraph = true, batch = true, distcc = true}) -- define rule: objc++.build rule("objc++.build") @@ -46,7 +46,7 @@ rule("objc++.build") target:add("frameworks", "Foundation", "CoreFoundation") end end) - on_build_files("private.action.build.object", {batch = true, distcc = true}) + on_build_files("private.action.build.object", {jobgraph = true, batch = true, distcc = true}) -- define rule: objc rule("objc++") diff --git a/xmake/rules/swift/xmake.lua b/xmake/rules/swift/xmake.lua index d1ea0e886..9a2dfbb5b 100644 --- a/xmake/rules/swift/xmake.lua +++ b/xmake/rules/swift/xmake.lua @@ -21,7 +21,7 @@ -- define rule: swift.build rule("swift.build") set_sourcekinds("sc") - on_build_files("private.action.build.object", {batch = true}) + on_build_files("private.action.build.object", {jobgraph = true, batch = true}) on_config(function (target) -- we use swift-frontend to support multiple modules -- @see https://github.com/xmake-io/xmake/issues/3916 diff --git a/xmake/rules/winsdk/xmake.lua b/xmake/rules/winsdk/xmake.lua index 0544abb86..6461c4eca 100644 --- a/xmake/rules/winsdk/xmake.lua +++ b/xmake/rules/winsdk/xmake.lua @@ -21,7 +21,7 @@ -- define rule: win.sdk.resource rule("win.sdk.resource") set_sourcekinds("mrc") - on_build_files("private.action.build.object", {batch = true}) + on_build_files("private.action.build.object", {jobgraph = true, batch = true}) -- define rule: application rule("win.sdk.application") diff --git a/xmake/rules/zig/xmake.lua b/xmake/rules/zig/xmake.lua index 4565fcda6..3d0a0a4b9 100644 --- a/xmake/rules/zig/xmake.lua +++ b/xmake/rules/zig/xmake.lua @@ -26,7 +26,7 @@ rule("zig.build") os.mkdir(cachedir) target:add("zcflags", "--cache-dir " .. cachedir) end) - on_build_files("private.action.build.object", {batch = true}) + on_build_files("private.action.build.object", {jobgraph = true, batch = true}) -- define rule: zig rule("zig") |
