summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-03-29 01:01:12 +0800
committerruki <[email protected]>2025-04-08 15:31:56 +0800
commita10183066026e54be1aabc1750a9dd41bc447aa0 (patch)
tree1f8dc94a1ddc5bf3a12fcd4722f29c92a122265f
parent386cf48145dcf2f21e003ccb71b36f1de169e169 (diff)
fix nil target
-rw-r--r--xmake/actions/build/target_utils.lua10
-rw-r--r--xmake/core/project/policy.lua2
2 files changed, 6 insertions, 6 deletions
diff --git a/xmake/actions/build/target_utils.lua b/xmake/actions/build/target_utils.lua
index 49066f23a..dfb21b23f 100644
--- a/xmake/actions/build/target_utils.lua
+++ b/xmake/actions/build/target_utils.lua
@@ -111,7 +111,7 @@ function add_targetjobs_for_builtin_script(jobgraph, target, job_kind)
end
-- add target jobs for the given script
-function add_targetjobs_for_script(jobgraph, instance, opt)
+function add_targetjobs_for_script(jobgraph, target, instance, opt)
opt = opt or {}
local has_script = false
@@ -198,7 +198,7 @@ function add_targetjobs_with_stage(jobgraph, target, stage, opt)
scriptcmd_name = scriptcmd_name
}
for _, instance in ipairs(instances) do
- if add_targetjobs_for_script(jobgraph, instance, script_opt) then
+ if add_targetjobs_for_script(jobgraph, target, instance, script_opt) then
has_script = true
end
end
@@ -299,7 +299,7 @@ function get_targetjobs(targets_root, opt)
end
-- add file jobs for the given script, TODO on single file
-function add_filejobs_for_script(jobgraph, instance, sourcebatch, opt)
+function add_filejobs_for_script(jobgraph, target, instance, sourcebatch, opt)
opt = opt or {}
local has_script = false
@@ -468,12 +468,12 @@ function add_filejobs_with_stage(jobgraph, target, sourcebatches, stage, opt)
for _, instance in ipairs(instances) do
if instance == target then
for _, sourcebatch in ipairs(sourcebatches) do
- add_filejobs_for_script(jobgraph, instance, sourcebatch, script_opt)
+ add_filejobs_for_script(jobgraph, target, instance, sourcebatch, script_opt)
end
else -- rule
local sourcebatch = sourcebatches_map[instance]
if sourcebatch then
- add_filejobs_for_script(jobgraph, instance, sourcebatch, script_opt)
+ add_filejobs_for_script(jobgraph, target, instance, sourcebatch, script_opt)
end
end
end
diff --git a/xmake/core/project/policy.lua b/xmake/core/project/policy.lua
index 76016e164..aae8e83df 100644
--- a/xmake/core/project/policy.lua
+++ b/xmake/core/project/policy.lua
@@ -95,7 +95,7 @@ function policy.policies()
-- Enable cuda device link
["build.cuda.devlink"] = {description = "Enable Cuda devlink.", type = "boolean"},
-- Enable build jobgraph
- ["build.jobgraph"] = {description = "Enable build jobgraph.", default = false, type = "boolean"},
+ ["build.jobgraph"] = {description = "Enable build jobgraph.", default = true, type = "boolean"},
-- Enable windows UAC and set level, e.g. invoker, admin, highest
["windows.manifest.uac"] = {description = "Enable windows manifest UAC.", type = "string"},
-- Enable ui access for windows UAC