summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-09-12 22:36:09 +0800
committerruki <[email protected]>2024-09-12 22:36:09 +0800
commite962066eca9967087a9a4495cf6a82fb2b4bd367 (patch)
tree71519af3d609c701f8a46a2f2b1341b5563d84c1
parent9e70298e25cde32fdde0cae65f4977a096eabfa7 (diff)
improve export all #5601
-rw-r--r--tests/projects/c++/shared_library_export_all/xmake.lua2
-rw-r--r--xmake/rules/utils/symbols/export_all/export_all.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/projects/c++/shared_library_export_all/xmake.lua b/tests/projects/c++/shared_library_export_all/xmake.lua
index 73159d4b5..50043a52a 100644
--- a/tests/projects/c++/shared_library_export_all/xmake.lua
+++ b/tests/projects/c++/shared_library_export_all/xmake.lua
@@ -8,7 +8,7 @@ target("foo")
target("bar")
set_kind("shared")
add_files("src/bar.cpp")
- add_rules("utils.symbols.export_all", {export_filter = function (symbol)
+ add_rules("utils.symbols.export_all", {export_filter = function (symbol, opt)
if symbol:find("add", 1, true) then
return true
end
diff --git a/xmake/rules/utils/symbols/export_all/export_all.lua b/xmake/rules/utils/symbols/export_all/export_all.lua
index 1c2806b79..0101bcfa5 100644
--- a/xmake/rules/utils/symbols/export_all/export_all.lua
+++ b/xmake/rules/utils/symbols/export_all/export_all.lua
@@ -47,7 +47,7 @@ function _get_allsymbols_by_dumpbin(target, dumpbin, opt)
symbol = symbol:sub(2)
end
if export_filter then
- if export_filter(symbol) then
+ if export_filter(symbol, {objectfile = objectfile}) then
allsymbols:insert(symbol)
end
elseif not symbol:startswith("__") then
@@ -88,7 +88,7 @@ function _get_allsymbols_by_objdump(target, objdump, opt)
symbol = symbol:sub(2)
end
if export_filter then
- if export_filter(symbol) then
+ if export_filter(symbol, {objectfile = objectfile}) then
allsymbols:insert(symbol)
end
elseif not symbol:startswith("__") then