[compilation db] fix problems with buck compilation database integration

Summary: This fixes compilation database integration with buck. Some directories from command don't exist (specifically ones that should hold `dep.tmp`). To workaround this problem, create those directories when invoking clang command

Reviewed By: jvillard, martinoluca

Differential Revision: D4403580

fbshipit-source-id: 57bcfc7
master
Andrzej Kotulski 8 years ago committed by Facebook Github Bot
parent 11810d849b
commit 3c482da094

@ -88,6 +88,12 @@ let clang_cc1_cmd_sanitizer cmd => {
if (String.equal option "-arch" && String.equal arg "armv7k") { if (String.equal option "-arch" && String.equal arg "armv7k") {
"armv7" "armv7"
/* replace armv7k arch with armv7 */ /* replace armv7k arch with armv7 */
} else if (
String.is_suffix arg suffix::"dep.tmp"
) {
/* compilation-database-buck integration produces path to `dep.tmp` file that doesn't exist. Create it */
Unix.mkdir_p (Filename.dirname arg);
arg
} else if ( } else if (
String.equal option "-isystem" String.equal option "-isystem"
) { ) {

Loading…
Cancel
Save