[cfe-dev] Clang Linux Driver Compilation

Iyer,Naveen R niyer at ufl.edu
Sat Jul 25 10:37:28 PDT 2015


I tried the following command for regular C source files:

clang-3.5 -S -emit-llvm hello.c -o - | opt -analyze -dot-callgraph

and it worked.


Now, I'm trying to do the same with linux device driver usbmouse.c (linux-4.1.1/drivers/hid/usbhid/). I tried the following make command:


make CC=clang-3.5 SUBDIRS=drivers/hid/usbhid/ CONFIG_USB_MOUSE=m modules


It gave several warnings, but nevertheless, looked like it compiled.

Could anybody please guide me on how I can modify the Makefile so as to generate callgraphs?


Thanks

Regards

Naveen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150725/0574dc28/attachment.html>


More information about the cfe-dev mailing list