Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

clangd indexer fails when command contains -march #40133

Open Quuxplusone opened 5 years ago

Quuxplusone commented 5 years ago
Bugzilla Link PR41163
Status NEW
Importance P normal
Reported by Louis Dupont (dupont.louis@ireq.ca)
Reported on 2019-03-20 17:29:42 -0700
Last modified on 2019-03-20 17:29:42 -0700
Version unspecified
Hardware PC Linux
CC llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments hello.tar.xz (12384 bytes, application/x-xz)
Blocks
Blocked by
See also
Created attachment 21636
Sample project with both the ok (build) and failing (build2) build commands

clangd indexer fails when command contains "-march". For example when provided
with the following compile_commands.json:

[
{
  "directory": "/home/project/hello/build",
  "command": "/usr/bin/cc  -I/home/project/hello/inc -march=armv7e-m -o CMakeFiles/hello.dir/src/hello.c.o   -c /home/project/hello/src/hello.c",
  "file": "/home/project/hello/src/hello.c"
}
]

clangd will create an empty .clangd/index folder. The folder content only
appears when "-march=armv7e-m" is removed from the command string. Observed
with:

clangd version 9.0.0-svn354959-1~exp1+0~20190227105110.828~1.gbpd90386
Quuxplusone commented 5 years ago

Attached hello.tar.xz (12384 bytes, application/x-xz): Sample project with both the ok (build) and failing (build2) build commands