summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/base/table.lua6
-rw-r--r--xmake/core/package/package.lua10
2 files changed, 6 insertions, 10 deletions
diff --git a/xmake/core/base/table.lua b/xmake/core/base/table.lua
index 0b368524a..f954596b8 100644
--- a/xmake/core/base/table.lua
+++ b/xmake/core/base/table.lua
@@ -377,6 +377,9 @@ function table.unique(array, barrier)
table.insert(unique, v)
end
end
+ if array.__wrap_locked__ then
+ table.wrap_lock(unique)
+ end
array = unique
end
end
@@ -402,6 +405,9 @@ function table.reverse_unique(array, barrier)
table.insert(unique, 1, v)
end
end
+ if array.__wrap_locked__ then
+ table.wrap_lock(unique)
+ end
array = unique
end
end
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index b9f6e8a06..d9ab55566 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -910,11 +910,6 @@ function _instance:manifest_save()
local name = apiname:sub(13)
local values = self:get(name)
if values ~= nil then
- -- we need wrap locked value, e.g. linkgroups = {{"m", "pthread"}}
- values = table.wrap(table.clone(values))
- for _, value in ipairs(values) do
- table.wrap_unlock(value)
- end
vars = vars or {}
vars[name] = values
local extra = self:extraconf(name)
@@ -928,11 +923,6 @@ function _instance:manifest_save()
if comp then
local component_values = comp:get(name)
if component_values ~= nil then
- -- we need wrap locked value, e.g. linkgroups = {{"m", "pthread"}}
- component_values = table.wrap(table.clone(component_values))
- for _, value in ipairs(component_values) do
- table.wrap_unlock(value)
- end
components = components or {}
components.vars = components.vars or {}
components.vars[component_name] = components.vars[component_name] or {}