-
-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xmake generates invalid compilation database #3159
Comments
no, it's valid and it works for me. It has been around for a long time and no other user has ever reported an error because of it. |
According to the spec of compilation database, the first argument should be the executable name. This is also how CLion interprets it, which leads to errors when using CLion. |
which errors? it works for vscode on my machine and I cannot get any errors in CLion. |
CLion complains about not being able to find "/usr/bin/xcrun -sdk macosx clang" in path (which I think is 100% justified) |
I can't reproduce the problem at the moment, so you can verify that it works by manually changing it to something like the following.
If this works, I will try to improve it. |
Yes, breaking up the first argument does work. |
try it again, |
but clangd does not support |
I improved it again, it will convert to xmake update -s dev |
Xmake Version
v2.7.3+202211090100
Operating System Version and Architecture
macOS Monterey
Describe Bug
When being used to compile 墨干 on macOS, xmake generates invalid compilation database files:
(full file)
As you can see, the first argument,
"/usr/bin/xcrun -sdk macosx clang"
is invalid as it does not point to an executable and should be broken up into four arguments instead.Expected Behavior
The generated compilation database file should be valid
Project Configuration
No response
Additional Information and Error Logs
To reproduce, just clone mogan and run
xmake project -k compile_commands
The text was updated successfully, but these errors were encountered: