Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

clangd broken command line options

Frank_R_1
New Contributor I
420 Views

Hi,

System:
Intel oneAPI 2024.2.0
Windows 10/11 and Linux RHEL8

Problem:
We found out that the clangd executable does not work either on Windows or Linux
We need this feature for version detection in our IDE (vs code, clion etc.)

On Windows we get:
clangd --version
clangd.exe: Unknown command line argument '--version'. Try: 'D:\p4ws\repo_cache\software\intel\oneAPI\2024.2.0\windows\compiler\2024.2\bin\compiler\clangd.exe --help'
clangd.exe: Did you mean '--log'?
clangd -v
clangd.exe: Unknown command line argument '-v'. Try: 'D:\p4ws\repo_cache\software\intel\oneAPI\2024.2.0\windows\compiler\2024.2\bin\compiler\clangd.exe --help'
clangd.exe: Did you mean '-j'?
clangd --help
clangd.exe: Unknown command line argument '--help'. Try: 'D:\p4ws\repo_cache\software\intel\oneAPI\2024.2.0\windows\compiler\2024.2\bin\compiler\clangd.exe --help'
clangd.exe: Did you mean '--check'?

Best regards

Frank

0 Kudos
4 Replies
Frank_R_1
New Contributor I
337 Views

Hi,

 

FYI:

clang-format.exe --help
clang-format.exe: Unknown command line argument '--help'. Try: 'D:clang-format.exe --help'
clang-format.exe: Did you mean '-n'?

 

Best regards

Frank

0 Kudos
Alex_Y_Intel
Moderator
270 Views

clangd doesn't come with Intel's oneAPI toolkits. And why is it a compiler issue? 

0 Kudos
Frank_R_1
New Contributor I
263 Views

Hi,

 

Of course it comes with the installation of Intel oneAPI:

C:\intel\oneAPI\2024.2.0\windows\compiler\2024.2\bin\compiler\clangd.exe

 

The whole llvm clang suite is installed under this path.

 

I just wanted to transport the information to the Intel developer team, that the command line options are messed up!

 

Best regards

Frank

0 Kudos
Alex_Y_Intel
Moderator
246 Views

My apologies, you're right that clangd comes in oneAPI package. 
I checked on Linux and Windows; for Linux I'm able to use --help to display a list of help options: 

$ clangd --help
OVERVIEW: clangd is a language server that provides IDE-like features to editors.

It should be used via an editor plugin rather than invoked directly. For more information, se e:
https://clangd.llvm.org/
https://microsoft.github.io/language-server-protocol/

clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment variable.

USAGE: clangd [options]

OPTIONS:

Generic Options:

--help - Display available options (--help-hidden for more)
--help-list - Display list of available options (--help-list-hidden for more)
--version - Display the version of this program

clangd compilation flags options:

--compile-commands-dir=<string> - Specify a path to look for compile_commands.json. If path is invalid, clangd will look in the current directory and parent paths of each source file
--query-driver=<string> - Comma separated list of globs for white-listing gcc-compa tible drivers that are safe to execute. Drivers matching any of these globs will be used to e xtract system includes. e.g. /usr/bin/**/clang-*,/path/to/repo/**/g++-*

clangd feature options:

--all-scopes-completion - If set to true, code completion will include index symbol s that are not defined in the scopes (e.g. namespaces) visible from the code completion point . Such completions can insert scope qualifiers

...

 

$ clangd --version
clangd version 12.0.1 (Red Hat 12.0.1-4.module_el8.5.0+1025+93159d6c)

 

--version and --help don't work on Windows. 

I'll check with our internal team. 

0 Kudos
Reply