summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2026-01-24 00:48:01 +0800
committerruki <[email protected]>2026-01-24 00:48:01 +0800
commit28364f0b9171c8c1eff46510c327b0ef63c4605c (patch)
tree5366b2de153254db3edba4ebc35e04c5be00584e
parent865ed17e98b3fa230b342138e3aaa6e9e5093cda (diff)
fix export c++ function symbols
-rw-r--r--xmake/rules/utils/symbols/export_all/export_all.lua33
1 files changed, 15 insertions, 18 deletions
diff --git a/xmake/rules/utils/symbols/export_all/export_all.lua b/xmake/rules/utils/symbols/export_all/export_all.lua
index fa75038d1..1da949653 100644
--- a/xmake/rules/utils/symbols/export_all/export_all.lua
+++ b/xmake/rules/utils/symbols/export_all/export_all.lua
@@ -83,14 +83,13 @@ function _get_allsymbols_by_dumpbin(target, dumpbin, opt)
allsymbols:insert(symbol)
end
elseif not symbol:startswith("__") then
- if export_classes or not symbol:startswith("?") then
- if export_classes then
- if not symbol:startswith("??_G") and not symbol:startswith("??_E") then
- allsymbols:insert(symbol)
- end
- else
+ if export_classes then
+ if not symbol:startswith("??_G") and not symbol:startswith("??_E") then
allsymbols:insert(symbol)
end
+ else
+ -- e.g. _add, ?add@@YAHHH@Z
+ allsymbols:insert(symbol)
end
end
end
@@ -129,14 +128,13 @@ function _get_allsymbols_by_objdump(target, objdump, opt)
allsymbols:insert(symbol)
end
elseif not symbol:startswith("__") then
- if export_classes or not symbol:startswith("?") then
- if export_classes then
- if not symbol:startswith("??_G") and not symbol:startswith("??_E") then
- allsymbols:insert(symbol)
- end
- else
+ if export_classes then
+ if not symbol:startswith("??_G") and not symbol:startswith("??_E") then
allsymbols:insert(symbol)
end
+ else
+ -- e.g. _add, ?add@@YAHHH@Z
+ allsymbols:insert(symbol)
end
end
end
@@ -180,14 +178,13 @@ function _get_allsymbols_by_readsyms(target, opt)
allsymbols:insert(symbol)
end
elseif not symbol:startswith("__") then
- if export_classes or not symbol:startswith("?") then
- if export_classes then
- if not symbol:startswith("??_G") and not symbol:startswith("??_E") then
- allsymbols:insert(symbol)
- end
- else
+ if export_classes then
+ if not symbol:startswith("??_G") and not symbol:startswith("??_E") then
allsymbols:insert(symbol)
end
+ else
+ -- e.g. _add, ?add@@YAHHH@Z
+ allsymbols:insert(symbol)
end
end
end