summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-06-19 00:44:39 +0800
committerruki <[email protected]>2021-06-19 00:44:39 +0800
commitb4949cad2aed6cf914273c07725eb0f45b4f518e (patch)
treef9fa5f2896f1e0b60813026f0271e39e302d5937
parente3e9c9a4cabe1fd164f5f8ad79e90d2e9e391437 (diff)
improve to export c++ classes
-rw-r--r--tests/projects/c++/shared_library_export_all/xmake.lua2
-rw-r--r--xmake/rules/utils/symbols/export_all/export_all.lua6
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/projects/c++/shared_library_export_all/xmake.lua b/tests/projects/c++/shared_library_export_all/xmake.lua
index 6bac1947f..fa25fac50 100644
--- a/tests/projects/c++/shared_library_export_all/xmake.lua
+++ b/tests/projects/c++/shared_library_export_all/xmake.lua
@@ -3,7 +3,7 @@ add_rules("mode.debug", "mode.release")
target("foo")
set_kind("shared")
add_files("src/foo.cpp")
- add_rules("utils.symbols.export_all", {with_classes = true})
+ add_rules("utils.symbols.export_all", {export_classes = true})
target("demo")
set_kind("binary")
diff --git a/xmake/rules/utils/symbols/export_all/export_all.lua b/xmake/rules/utils/symbols/export_all/export_all.lua
index 83f92eb2a..d403859ba 100644
--- a/xmake/rules/utils/symbols/export_all/export_all.lua
+++ b/xmake/rules/utils/symbols/export_all/export_all.lua
@@ -47,8 +47,8 @@ function main (target, opt)
local msvc = toolchain.load("msvc", {plat = target:plat(), arch = target:arch()})
local dumpbin = assert(find_tool("dumpbin", {envs = msvc:runenvs()}), "dumpbin not found!")
- -- export with c++ class?
- local export_with_classes = target:extraconf("rules", "utils.symbols.export_all", "with_classes")
+ -- export c++ class?
+ local export_classes = target:extraconf("rules", "utils.symbols.export_all", "export_classes")
-- get all symbols from object files
local allsymbols = hashset.new()
@@ -65,7 +65,7 @@ function main (target, opt)
if target:is_arch("x86") and symbol:startswith("_") then
symbol = symbol:sub(2)
end
- if export_with_classes or not symbol:startswith("?") then
+ if export_classes or not symbol:startswith("?") then
allsymbols:insert(symbol)
end
end