Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix export_all when use export_filter on arch x86 #5512

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading