Summary: One gets very obscure errors when trying to run infer for clang when it was compiled for Java, or vice-versa. This diff makes sure we crash early with the appropriate error message. For instance: ``` $ ./build-infer java $ infer -- clang -c hello.c Uncaught exception: (Failure "Unsupported build mode: make/cc\ \nInfer was built with clang analyzers disabled.\ \nPlease rebuild infer with clang enabled.\ \n") Raised at file "pervasives.ml", line 30, characters 22-33 Called from file "backend/infer.ml", line 398, characters 6-48 Called from file "backend/infer.ml", line 449, characters 20-38 $ infer --clang-compilation-db-files foo.json Uncaught exception: (Failure "Unsupported build mode: clang compilation database\ \nInfer was built with clang analyzers disabled.\ \nPlease rebuild infer with clang enabled.\ \n") Raised at file "pervasives.ml", line 30, characters 22-33 Called from file "backend/infer.ml", line 392, characters 8-65 Called from file "backend/infer.ml", line 449, characters 20-38 ``` Reviewed By: sblackshear Differential Revision: D4566641 fbshipit-source-id: d9a118fmaster
parent
451adc7949
commit
f796ba6bb8
Loading…
Reference in new issue