@@ -42,15 +42,15 @@ function _get_allsymbols_by_dumpbin(target, dumpbin, opt)
42
42
local symbol = line :match (" .*External%s+| (.*)" )
43
43
if symbol then
44
44
symbol = symbol :split (' %s' )[1 ]
45
+ -- we need ignore DllMain, https://github.com/xmake-io/xmake/issues/3992
46
+ if target :is_arch (" x86" ) and symbol :startswith (" _" ) and not symbol :startswith (" __" ) and not symbol :startswith (" _DllMain@" ) then
47
+ symbol = symbol :sub (2 )
48
+ end
45
49
if export_filter then
46
50
if export_filter (symbol ) then
47
51
allsymbols :insert (symbol )
48
52
end
49
53
elseif not symbol :startswith (" __" ) then
50
- -- we need ignore DllMain, https://github.com/xmake-io/xmake/issues/3992
51
- if target :is_arch (" x86" ) and symbol :startswith (" _" ) and not symbol :startswith (" _DllMain@" ) then
52
- symbol = symbol :sub (2 )
53
- end
54
54
if export_classes or not symbol :startswith (" ?" ) then
55
55
if export_classes then
56
56
if not symbol :startswith (" ??_G" ) and not symbol :startswith (" ??_E" ) then
@@ -83,15 +83,15 @@ function _get_allsymbols_by_objdump(target, objdump, opt)
83
83
local splitinfo = line :split (" %s" )
84
84
local symbol = splitinfo [# splitinfo ]
85
85
if symbol then
86
+ -- we need ignore DllMain, https://github.com/xmake-io/xmake/issues/3992
87
+ if target :is_arch (" x86" ) and symbol :startswith (" _" ) and not symbol :startswith (" __" ) and not symbol :startswith (" _DllMain@" ) then
88
+ symbol = symbol :sub (2 )
89
+ end
86
90
if export_filter then
87
91
if export_filter (symbol ) then
88
92
allsymbols :insert (symbol )
89
93
end
90
94
elseif not symbol :startswith (" __" ) then
91
- -- we need ignore DllMain, https://github.com/xmake-io/xmake/issues/3992
92
- if target :is_arch (" x86" ) and symbol :startswith (" _" ) and not symbol :startswith (" _DllMain@" ) then
93
- symbol = symbol :sub (2 )
94
- end
95
95
if export_classes or not symbol :startswith (" ?" ) then
96
96
if export_classes then
97
97
if not symbol :startswith (" ??_G" ) and not symbol :startswith (" ??_E" ) then
0 commit comments