diff --git a/INSTALL.md b/INSTALL.md index 88ec58d41..ddea9b96f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -18,7 +18,9 @@ is required to compile everything from source. - sqlite - pkg-config - Java (only needed for the Java analysis) -- cmake (only needed for the C/Objective-C analysis) +- CMake (only needed for the C/Objective-C analysis) +- Ninja (optional, if you wish to use sequential linking when building the + C/Objective-C analysis) - clang in Xcode command line tools. You can install them with the command `xcode-select --install` (only needed for the C/Objective-C analysis) - Xcode >= 6.1 (only needed for the C/Objective-C analysis) @@ -45,6 +47,9 @@ is required to compile everything from source. - Java (only needed for the Java analysis) - gcc >= 5.X or clang >= 3.4 (only needed for the C/Objective-C analysis) - autoconf >= 2.63 and automake >= 1.11.1 (if building from git) +- CMake (only needed for the C/Objective-C analysis) +- Ninja (optional, if you wish to use sequential linking when building the + C/Objective-C analysis) See also the distro-specific instructions for Ubuntu and Debian below. diff --git a/Makefile b/Makefile index 8e335ac64..bcbd4467f 100644 --- a/Makefile +++ b/Makefile @@ -299,6 +299,10 @@ ifeq ($(BUILD_C_ANALYZERS),yes) byte src_build src_build_common test_build: clang_plugin endif +ifneq ($(NINJA),no) +FCP_COMPILE_ARGS = --ninja --sequential-link +endif + $(INFER_COMMAND_MANUALS): src_build $(MAKEFILE_LIST) $(QUIET)$(MKDIR_P) $(@D) $(QUIET)$(INFER_BIN) $(patsubst infer-%.1,%,$(@F)) --help-scrubbed --help-format=groff > $@ @@ -361,7 +365,7 @@ clang_setup: echo '$(TERM_INFO)(TIP: you can also force a clang rebuild by removing $(FCP_DIR)/clang/installed.version)$(TERM_RESET)' >&2; \ echo >&2 ; \ fi; \ - $(FCP_DIR)/clang/setup.sh; \ + $(FCP_DIR)/clang/setup.sh $(FCP_COMPILE_ARGS); \ } .PHONY: clang_plugin diff --git a/Makefile.autoconf.in b/Makefile.autoconf.in index 868c8681e..547ed66c0 100644 --- a/Makefile.autoconf.in +++ b/Makefile.autoconf.in @@ -59,6 +59,7 @@ MKDIR_P = $(shell $(MKDIR_P_CMD)) MVN = @MVN@ NCPU = @NCPU@ NDKBUILD = @NDKBUILD@ +NINJA = @NINJA@ OCAMLBUILD = @OCAMLBUILD@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ diff --git a/configure.ac b/configure.ac index 15af58998..0d3999c72 100644 --- a/configure.ac +++ b/configure.ac @@ -378,6 +378,8 @@ if test x"$NDKBUILD" = x"no"; then [$PATH$PATH_SEPARATOR$ANDROID_NDK$PATH_SEPARATOR/opt/android_ndk/r15c]) fi +AC_CHECK_TOOL([NINJA], [ninja], [no]) + AC_CHECK_TOOL([XCPRETTY], [xcpretty], [no]) AC_CHECK_TOOL([SED], [sed], [no]) diff --git a/facebook-clang-plugins b/facebook-clang-plugins index a9c545fec..bd8863933 160000 --- a/facebook-clang-plugins +++ b/facebook-clang-plugins @@ -1 +1 @@ -Subproject commit a9c545fecae6cc447c28d4535488986941858ab1 +Subproject commit bd8863933f710a5b1f158e67da8c59ddaa654aa8