Prevent external linker lib dir flags from bleeding through to configuration lists

This commit is contained in:
Jason Perkins 2012-06-06 11:09:58 -04:00
parent c1a793ae65
commit cab63d8b14
2 changed files with 14 additions and 1 deletions

View File

@ -19,6 +19,19 @@
end
--
-- Make a copy of the indexed elements of the table.
--
function table.arraycopy(object)
local result = {}
for i, value in ipairs(object) do
result[i] = value
end
return result
end
--
-- Make a complete copy of a table, including any child tables it contains.
--

View File

@ -219,7 +219,7 @@
function config.getlinks(cfg, kind, part)
-- if I'm building a list of link directories, include libdirs
local result = iif (part == "directory" and kind == "all", cfg.libdirs, {})
local result = iif (part == "directory" and kind == "all", table.arraycopy(cfg.libdirs), {})
local function canlink(source, target)
-- can't link executables