summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/actions/build/kinds/binary.lua2
-rw-r--r--xmake/actions/build/kinds/shared.lua2
-rw-r--r--xmake/actions/build/kinds/static.lua2
-rw-r--r--xmake/actions/build/xmake.lua3
4 files changed, 5 insertions, 4 deletions
diff --git a/xmake/actions/build/kinds/binary.lua b/xmake/actions/build/kinds/binary.lua
index 76ccbcd9b..e9607707d 100644
--- a/xmake/actions/build/kinds/binary.lua
+++ b/xmake/actions/build/kinds/binary.lua
@@ -54,7 +54,7 @@ function _do_link_target(target, opt)
end
end, {dependfile = target:dependfile(),
lastmtime = os.mtime(target:targetfile()),
- changed = target:is_rebuilt(),
+ changed = target:is_rebuilt() or option.get("linkonly"),
values = depvalues, files = depfiles, dryrun = dryrun})
end
diff --git a/xmake/actions/build/kinds/shared.lua b/xmake/actions/build/kinds/shared.lua
index 67671b7ef..9b65381e6 100644
--- a/xmake/actions/build/kinds/shared.lua
+++ b/xmake/actions/build/kinds/shared.lua
@@ -55,7 +55,7 @@ function _do_link_target(target, opt)
end, {dependfile = target:dependfile(),
lastmtime = os.mtime(target:targetfile()),
- changed = target:is_rebuilt(),
+ changed = target:is_rebuilt() or option.get("linkonly"),
values = depvalues, files = depfiles, dryrun = dryrun})
end
diff --git a/xmake/actions/build/kinds/static.lua b/xmake/actions/build/kinds/static.lua
index 11f9c7f6a..6b28eb4e1 100644
--- a/xmake/actions/build/kinds/static.lua
+++ b/xmake/actions/build/kinds/static.lua
@@ -55,7 +55,7 @@ function _do_link_target(target, opt)
end, {dependfile = target:dependfile(),
lastmtime = os.mtime(target:targetfile()),
- changed = target:is_rebuilt(),
+ changed = target:is_rebuilt() or option.get("linkonly"),
values = depvalues, files = depfiles, dryrun = dryrun})
end
diff --git a/xmake/actions/build/xmake.lua b/xmake/actions/build/xmake.lua
index 8cdbb953b..9cdacdbea 100644
--- a/xmake/actions/build/xmake.lua
+++ b/xmake/actions/build/xmake.lua
@@ -32,7 +32,7 @@ task("build")
, {'r', "rebuild", "k", nil , "Rebuild the target." }
, {'a', "all", "k", nil , "Build all targets." }
, {nil, "shallow", "k", nil , "Only re-build the given targets without dependencies." }
- , {'g', "group", "kv", nil , "Build all targets of the given group. It support path pattern matching.",
+ , {'g', "group", "kv", nil , "Build all targets of the given group. It support path pattern matching.",
"e.g.",
" xmake -g test",
" xmake -g test_*",
@@ -44,6 +44,7 @@ task("build")
"Set the number of parallel compilation jobs." }
, {nil, "linkjobs", "kv", nil, "Set the number of parallel link jobs." }
, {'w', "warning", "k", false , "Enable the warnings output. (deprecated)" }
+ , {nil, "linkonly", "k", false , "Only link targets if object files have been compiled." }
, {nil, "files", "kv", nil , "Build the given source files.",
"e.g. ",
" - xmake --files=src/main.c",