summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-07-06 22:35:43 +0800
committerruki <[email protected]>2022-07-06 22:35:43 +0800
commitb1a7cebd5fedb7014c78255622454464b17f4a61 (patch)
tree5836933d0303f607ea02f428a45da42ad2ce8790
parent4a381cdb0f0e276cea2339f06ac4222dd2b568f2 (diff)
improve compile command
-rw-r--r--xmake/plugins/project/clang/compile_commands.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/plugins/project/clang/compile_commands.lua b/xmake/plugins/project/clang/compile_commands.lua
index ae1043d12..20b096a4c 100644
--- a/xmake/plugins/project/clang/compile_commands.lua
+++ b/xmake/plugins/project/clang/compile_commands.lua
@@ -37,6 +37,9 @@ function _translate_arguments(arguments)
local cc = path.basename(arguments[1]):lower()
local is_include = false
for idx, arg in ipairs(arguments) do
+ -- convert path to string, maybe we need convert path, but not supported now.
+ arg = tostring(arg)
+
-- see https://github.com/xmake-io/xmake/issues/1721
if idx == 1 and is_host("windows") and path.extension(arg) == "" then
arg = arg .. ".exe"