summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-07-24 23:34:09 +0800
committerruki <[email protected]>2023-07-24 23:34:09 +0800
commit1d6cfd67ebb44f908edaf562dfa45747186a92f7 (patch)
tree51b3cd895cf70c9b8bf12ce3984bfe7b80860b84
parentf79ebdd7c8ae625a995c99e58b4cd8dbd5c502ee (diff)
fix export for dllmain #3992
-rw-r--r--xmake/rules/utils/symbols/export_all/export_all.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/rules/utils/symbols/export_all/export_all.lua b/xmake/rules/utils/symbols/export_all/export_all.lua
index f8247a878..a9d264e50 100644
--- a/xmake/rules/utils/symbols/export_all/export_all.lua
+++ b/xmake/rules/utils/symbols/export_all/export_all.lua
@@ -63,7 +63,8 @@ function main (target, opt)
if symbol then
symbol = symbol:split('%s')[1]
if not symbol:startswith("__") then
- if target:is_arch("x86") and 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