summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/merge_object/xmake.lua2
-rw-r--r--xmake/core/project/target.lua3
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/merge_object/xmake.lua b/tests/merge_object/xmake.lua
index 6be5eff44..b8f971536 100755
--- a/tests/merge_object/xmake.lua
+++ b/tests/merge_object/xmake.lua
@@ -41,5 +41,5 @@ target("test")
-- add files
add_files("src/test.c")
- add_files("build/.objs/merge_object/src/interface.o")
+ add_files("build/.objs/merge_object/src/interface.c.o")
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index 1e687b8f2..34b11b67c 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -283,7 +283,8 @@ function target:objectfiles()
sourcefile = sourcefile:gsub(target.filename("([%w_]+)", "static"):gsub("%.", "%%.") .. "$", "%1/*")
-- make object file
- local objectfile = string.format("%s/%s/%s/%s", objectdir, self:name(), path.directory(sourcefile), target.filename(path.basename(sourcefile), "object"))
+ -- full file name(not base) to avoid name-clash of object file
+ local objectfile = string.format("%s/%s/%s/%s", objectdir, self:name(), path.directory(sourcefile), target.filename(path.filename(sourcefile), "object"))
-- translate path
--