diff options
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/project/clang/compile_commands.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/plugins/project/clang/compile_commands.lua b/xmake/plugins/project/clang/compile_commands.lua index cc86a7b5e..e7207d094 100644 --- a/xmake/plugins/project/clang/compile_commands.lua +++ b/xmake/plugins/project/clang/compile_commands.lua @@ -88,7 +88,13 @@ function _translate_arguments(arguments) is_include = true end if arg then - table.insert(args, arg) + -- split "/usr/bin/xcrun -sdk macosx clang" + -- @see https://github.com/xmake-io/xmake/issues/3159 + if idx == 1 and arg:find(" ", 1, true) then + table.join2(args, os.argv(arg)) + else + table.insert(args, arg) + end end end return args |
