summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorruki <[email protected]>2024-09-12 22:40:41 +0800
committerruki <[email protected]>2024-09-12 22:40:41 +0800
commite22e69c851c611e5ab42d36e592534dc2e02ea92 (patch)
tree29a98c266b749e56585f45062a34f007d70d4247 /tests
parentc72f5f04b33f65c5b2fd4cae5037a1bdaf4dab84 (diff)
get sourcefile for export all
Diffstat (limited to 'tests')
-rw-r--r--tests/projects/c++/shared_library_export_all/xmake.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/projects/c++/shared_library_export_all/xmake.lua b/tests/projects/c++/shared_library_export_all/xmake.lua
index 33d2c7d0c..bc7b0dd68 100644
--- a/tests/projects/c++/shared_library_export_all/xmake.lua
+++ b/tests/projects/c++/shared_library_export_all/xmake.lua
@@ -9,8 +9,9 @@ target("bar")
set_kind("shared")
add_files("src/bar.cpp")
add_rules("utils.symbols.export_all", {export_filter = function (symbol, opt)
- local objectfile = opt.objectfile
- if objectfile:find("bar.cpp", 1, true) and symbol:find("add", 1, true) then
+ local filepath = opt.sourcefile or opt.objectfile
+ if filepath and filepath:find("bar.cpp", 1, true) and symbol:find("add", 1, true) then
+ print("export: %s at %s", symbol, filepath)
return true
end
end})