summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-08-17 11:52:29 +0800
committerruki <[email protected]>2025-08-17 11:52:29 +0800
commit62692a409f31cb14e527f37da59dd2767d4af3f2 (patch)
tree0ce5c4dc4684f600fa16ad0ca4e16efff4f15dcb
parentc0f722557a032f969e89d130d35af795f8fdd81e (diff)
fix arg
-rw-r--r--xmake/plugins/project/clang/compile_commands.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/plugins/project/clang/compile_commands.lua b/xmake/plugins/project/clang/compile_commands.lua
index 2fed079f1..9435819df 100644
--- a/xmake/plugins/project/clang/compile_commands.lua
+++ b/xmake/plugins/project/clang/compile_commands.lua
@@ -137,12 +137,12 @@ function _translate_arguments(arguments)
end
end
end
- if arg == "-I" then
+ if arg and arg == "-I" then
is_include = true
end
-- ignore pch flags
-- https://github.com/xmake-io/xmake/issues/6710
- if arg == "-include-pch" or arg:endswith(".pch") then
+ if arg and (arg == "-include-pch" or arg:endswith(".pch")) then
arg = nil
end
if arg then