diff options
| author | ruki <[email protected]> | 2022-12-17 11:10:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-12-17 11:10:04 +0800 |
| commit | 86c97b4c284096e675f11fcf5ba446f33721d94f (patch) | |
| tree | 05b7e0bea6c97fc271f5753a2f48924d889c5ee6 | |
| parent | cdd00fc9212627ff21ddd531145cc02092e1b84b (diff) | |
fix compile_commands #3159
| -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 |
