How to generate compilation database when doing "mm" or "mma" command?

487 views
Skip to first unread message

Shuai Yuan

unread,
Jun 11, 2018, 3:04:05 PM6/11/18
to ninja-build
Hi,

Does anyone know how to generate compilation database, often knows as compile_commands.json when doing "mm" or "mma"?
Thanks

Takuto Ikuta

unread,
Jun 11, 2018, 7:00:54 PM6/11/18
to fiddl...@gmail.com, ninja-build
What is "mm" or "mma", which ninja generator are you using?
Come from android build?

Assuming you want to get compile_commands.json for c/c++, you might be get it by running 'ninja -t compdb cc cxx' in the directory having build.ninja.


2018年6月12日(火) 4:04 Shuai Yuan <fiddl...@gmail.com>:
Hi,

Does anyone know how to generate compilation database, often knows as compile_commands.json when doing "mm" or "mma"?
Thanks

--
You received this message because you are subscribed to the Google Groups "ninja-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Takuto Ikuta
Software Engineer in Tokyo
Chrome Infrastructure (goma team)

Nick Diego Yamane

unread,
Jun 12, 2018, 9:51:41 AM6/12/18
to Takuto Ikuta, fiddl...@gmail.com, ninja-build
I think you've sent the question to the wrong mailing list, I guess you should send it to 'android-build'. mm and mma probably are AOSP bash helpers for building AOSP modules. Anyway, "NINJA_ARGS='-t compdb' mma" should do the trick if I can recall.

Att.
Nick Yamane
--

Nick Yamane
+5592991671550

Shuai Yuan

unread,
Jun 12, 2018, 9:55:05 PM6/12/18
to ninja-build
Thank you so much, this seems promising.
Reply all
Reply to author
Forward
0 new messages