diff options
| author | ruki <[email protected]> | 2016-07-04 13:56:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-07-04 13:56:26 +0800 |
| commit | 2acc00d97e75abee7e1871f699c69136d37c4e49 (patch) | |
| tree | 99925e86cee9a7c4a22dc211d1e0aa834a52b8b9 | |
| parent | 991766917fa74db2ea91df348fdbb79da190a0f9 (diff) | |
fix package bug
| -rwxr-xr-x | xmake/actions/build/builder.lua | 15 | ||||
| -rwxr-xr-x | xmake/actions/package/main.lua | 2 |
2 files changed, 15 insertions, 2 deletions
diff --git a/xmake/actions/build/builder.lua b/xmake/actions/build/builder.lua index 9ecbd4b25..8264e4476 100755 --- a/xmake/actions/build/builder.lua +++ b/xmake/actions/build/builder.lua @@ -192,9 +192,22 @@ function _build_target(target) -- update target index _g.targetindex = _g.targetindex + 1 + -- expand object files with *.o/obj + local objectfiles = {} + for _, objectfile in ipairs(target:objectfiles()) do + if objectfile:find("%*") then + local matchfiles = os.match(objectfile) + if matchfiles then + table.join2(objectfiles, matchfiles) + end + else + table.insert(objectfiles, objectfile) + end + end + -- make the command for linking target local targetfile = target:targetfile() - local command = linker.linkcmd(target:objectfiles(), targetfile, target) + local command = linker.linkcmd(objectfiles, targetfile, target) -- trace print("[%02d%%]: linking.$(mode) %s", _g.targetindex * 100 / _g.targetcount, path.filename(targetfile)) diff --git a/xmake/actions/package/main.lua b/xmake/actions/package/main.lua index 986d28d17..377d31eea 100755 --- a/xmake/actions/package/main.lua +++ b/xmake/actions/package/main.lua @@ -165,7 +165,7 @@ function _package_target_and_deps(target) end -- package target - _package_target(target) + _package(target) -- finished _g.finished[target:name()] = true |
