Skip to content

Commit a69e527

Browse files
committed
show: fix linker info for non-linkable targets
1 parent 1a758e5 commit a69e527

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

xmake/plugins/show/info/target.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ function _show_target(target)
227227
cprint(" ${color.dump.reference}->${clear} %s", os.args(compinst:compflags()))
228228
end
229229
end
230-
local linker = target:linker()
230+
local linker = targetfile and target:linker()
231231
if linker then
232232
cprint(" ${color.dump.string}linker (%s)${clear}: %s", linker:kind(), linker:program())
233233
cprint(" ${color.dump.reference}->${clear} %s", os.args(linker:linkflags()))
@@ -239,7 +239,6 @@ function _show_target(target)
239239
cprint(" ${color.dump.reference}->${clear} %s", os.args(compinst:compflags({target = target})))
240240
end
241241
end
242-
local linker = target:linker()
243242
if linker then
244243
cprint(" ${color.dump.string}linkflags (%s)${clear}:", linker:kind())
245244
cprint(" ${color.dump.reference}->${clear} %s", os.args(linker:linkflags({target = target})))

0 commit comments

Comments
 (0)