Skip to content

Commit

Permalink
Merge pull request #5512 from ChrisCatCP/export_all
Browse files Browse the repository at this point in the history
fix export_all when use export_filter on arch x86
  • Loading branch information
waruqi authored Aug 27, 2024
2 parents c3d03f9 + d6174f9 commit 9216042
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions xmake/rules/utils/symbols/export_all/export_all.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9216042

Please sign in to comment.