Skip to content

Commit

Permalink
Merge pull request #5725 from xmake-io/linkonly
Browse files Browse the repository at this point in the history
add linkonly #5716
  • Loading branch information
waruqi authored Oct 17, 2024
2 parents ead6347 + 5951fcc commit 241631f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion xmake/actions/build/kinds/binary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion xmake/actions/build/kinds/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion xmake/actions/build/kinds/static.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion xmake/actions/build/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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_*",
Expand All @@ -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",
Expand Down

0 comments on commit 241631f

Please sign in to comment.