diff options
| author | ruki <[email protected]> | 2020-10-06 22:43:42 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-10-06 22:43:42 +0800 |
| commit | feccf0c3ce0086fcbe5eee955e8ecbad67d834a1 (patch) | |
| tree | 09f93f4e2107f315819d69f78d66e5d2d29ee8cc /xmake/actions/build/kinds/binary.lua | |
| parent | e7306f7955c3752c220189bd0773e7ed088307f8 (diff) | |
remove some unused codes
Diffstat (limited to 'xmake/actions/build/kinds/binary.lua')
| -rw-r--r-- | xmake/actions/build/kinds/binary.lua | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/xmake/actions/build/kinds/binary.lua b/xmake/actions/build/kinds/binary.lua index 0ef42ff49..38fb73bc6 100644 --- a/xmake/actions/build/kinds/binary.lua +++ b/xmake/actions/build/kinds/binary.lua @@ -36,23 +36,16 @@ function _do_link_target(target, opt) -- get link flags local linkflags = linkinst:linkflags({target = target}) - -- expand object files with *.o/obj - local objectfiles = {} - for _, objectfile in ipairs(target:objectfiles()) do - if objectfile:find("*", 1, true) then - local matchfiles = os.match(objectfile) - if matchfiles then - table.join2(objectfiles, matchfiles) - end - else - table.insert(objectfiles, objectfile) - end - end + -- get object files + local objectfiles = target:objectfiles() -- need build this target? - local depfiles = target:objectfiles() - for _, dep in pairs(target:deps()) do + local depfiles = objectfiles + for _, dep in ipairs(target:orderdeps()) do if dep:targetkind() == "static" then + if depfiles == objectfiles then + depfiles = table.copy(objectfiles) + end table.insert(depfiles, dep:targetfile()) end end |
