summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoildkv <[email protected]>2021-10-12 14:01:16 +0800
committerGitHub <[email protected]>2021-10-12 14:01:16 +0800
commit72fabb25dd367d87faa7a9461a6e79faa7196c48 (patch)
tree0564d1ae7cbb9fe1bb36f6337162d15c3f05e8b8
parentb143a5713590a3f6a64351eee31dd15ee1177228 (diff)
make symbols outsides the library not exposed
-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 800157411..f8247a878 100644
--- a/xmake/rules/utils/symbols/export_all/export_all.lua
+++ b/xmake/rules/utils/symbols/export_all/export_all.lua
@@ -56,8 +56,9 @@ function main (target, opt)
local objectsymbols = try { function () return os.iorunv(dumpbin.program, {"/symbols", "/nologo", objectfile}) end }
if objectsymbols then
for _, line in ipairs(objectsymbols:split('\n', {plain = true})) do
+ -- https://docs.microsoft.com/en-us/cpp/build/reference/symbols
-- 008 00000000 SECT3 notype () External | add
- if line:find("External") then
+ if line:find("External") and not line:find("UNDEF") then
local symbol = line:match(".*External%s+| (.*)")
if symbol then
symbol = symbol:split('%s')[1]