summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-08-27 11:32:12 +0800
committerGitHub <[email protected]>2024-08-27 11:32:12 +0800
commit92160428900e8ee1cb7fc288c4df8fa69a3426a1 (patch)
tree293e8dd7954933e3086f25b8c4b462f32b50cca6
parentc3d03f97c06170bf5d6f365c78bede6e10d282b7 (diff)
parentd6174f97617536f2076a9284f51acb1078839f01 (diff)
Merge pull request #5512 from ChrisCatCP/export_all
fix export_all when use export_filter on arch x86
-rw-r--r--xmake/rules/utils/symbols/export_all/export_all.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/xmake/rules/utils/symbols/export_all/export_all.lua b/xmake/rules/utils/symbols/export_all/export_all.lua
index c188d8386..1c2806b79 100644
--- a/xmake/rules/utils/symbols/export_all/export_all.lua
+++ b/xmake/rules/utils/symbols/export_all/export_all.lua
@@ -42,15 +42,15 @@ function _get_allsymbols_by_dumpbin(target, dumpbin, opt)
local symbol = line:match(".*External%s+| (.*)")
if symbol then
symbol = symbol:split('%s')[1]
+ -- we need ignore DllMain, https://github.com/xmake-io/xmake/issues/3992
+ if target:is_arch("x86") and symbol:startswith("_") and not symbol:startswith("__") and not symbol:startswith("_DllMain@") then
+ symbol = symbol:sub(2)
+ end
if export_filter then
if export_filter(symbol) then
allsymbols:insert(symbol)
end
elseif not symbol:startswith("__") then
- -- we need ignore DllMain, https://github.com/xmake-io/xmake/issues/3992
- if target:is_arch("x86") and symbol:startswith("_") and not symbol:startswith("_DllMain@") then
- symbol = symbol:sub(2)
- end
if export_classes or not symbol:startswith("?") then
if export_classes then
if not symbol:startswith("??_G") and not symbol:startswith("??_E") then
@@ -83,15 +83,15 @@ function _get_allsymbols_by_objdump(target, objdump, opt)
local splitinfo = line:split("%s")
local symbol = splitinfo[#splitinfo]
if symbol then
+ -- we need ignore DllMain, https://github.com/xmake-io/xmake/issues/3992
+ if target:is_arch("x86") and symbol:startswith("_") and not symbol:startswith("__") and not symbol:startswith("_DllMain@") then
+ symbol = symbol:sub(2)
+ end
if export_filter then
if export_filter(symbol) then
allsymbols:insert(symbol)
end
elseif not symbol:startswith("__") then
- -- we need ignore DllMain, https://github.com/xmake-io/xmake/issues/3992
- if target:is_arch("x86") and symbol:startswith("_") and not symbol:startswith("_DllMain@") then
- symbol = symbol:sub(2)
- end
if export_classes or not symbol:startswith("?") then
if export_classes then
if not symbol:startswith("??_G") and not symbol:startswith("??_E") then