[release] preparing for binary releases

Summary:
Change the documentation to refer to (upcoming) binary releases. Update the
scripts to treat .release differently: now we want to build clang and the
plugins even in release mode, as that's just the preparation for the release
tarball containing only binaries.

Reviewed By: mbouaziz

Differential Revision: D8235388

fbshipit-source-id: bfb4ae8
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent 69ead917c3
commit 8bda23fadc

1
.gitignore vendored

@ -44,6 +44,7 @@ duplicates.txt
/infer/tests/build_systems/genrule/report.json
/infer/tests/build_systems/java_test_determinator/*.test
/_release
/infer-source
# generated by oUnit
/oUnit-all.cache

@ -1,22 +1,18 @@
# How to install Infer from source
## Pre-compiled clang versions
## Binary versions
We provide a source release of Infer packaged with pre-build binaries
for clang and facebook-clang-plugins for Linux and MacOS. We encourage
you to use this release as compiling clang is time-consuming. Install
the dependencies as explained in the next section, then follow the
instructions in our [Getting
We provide a binary release of Infer. We encourage you to use this
release as compiling infer's dependencies is time-consuming. Follow
the instructions in our [Getting
Started](http://fbinfer.com/docs/getting-started.html#install-from-source)
page to compile and install Infer.
page to install Infer.
## Infer dependencies for MacOSX
Here are the prerequisites to be able to compile Infer on MacOSX. This
is required to be able to [use the
release](http://fbinfer.com/docs/getting-started.html) (faster), or to
compile everything from source (see the end of this document).
is required to compile everything from source.
- opam 1.2.2 (instructions [here](https://opam.ocaml.org/doc/Install.html#OSX))
- Python 2.7
@ -41,9 +37,7 @@ brew cask install java
## Infer dependencies for Linux
Here are the prerequisites to be able to compile Infer on Linux. This
is required to be able to [use the
release](http://fbinfer.com/docs/getting-started.html) (faster), or to
compile everything from source (see the end of this document).
is required to compile everything from source.
- opam 1.2.2
- Python 2.7
@ -73,9 +67,7 @@ Replace `./build-infer.sh java` with `./build-infer.sh clang` to build
the C and Objective-C analyzer from source. Beware that this command
may take a really long time because it will compile a custom version
of clang. This custom version is used by Infer to parse C and
Objective-C source code. We encourage you to use [a
release](https://github.com/facebook/infer/releases/) instead, which
ship with clang already compiled.
Objective-C source code.
See `./build-infer.sh --help` for more options, eg `./build-infer.sh`
on its own will build the analyzers for both Java and C/ObjC.

@ -257,7 +257,6 @@ clang_setup:
.PHONY: clang_plugin
clang_plugin: clang_setup
ifeq ($(IS_RELEASE_TREE),no)
$(QUIET)$(call silent_on_success,Building clang plugin,\
$(MAKE) -C $(FCP_DIR)/libtooling all \
CC=$(CC) CXX=$(CXX) \
@ -275,7 +274,6 @@ ifeq ($(IS_RELEASE_TREE),no)
LOCAL_CLANG=$(CLANG_PREFIX)/bin/clang \
CLANG_PREFIX=$(CLANG_PREFIX) \
CLANG_INCLUDES=$(CLANG_INCLUDES))
endif
.PHONY: clang_plugin_test
clang_plugin_test: clang_setup
@ -558,11 +556,9 @@ endif
# Nuke objects built from OCaml. Useful when changing the OCaml compiler, for instance.
.PHONY: ocaml_clean
ocaml_clean:
ifeq ($(IS_RELEASE_TREE),no)
ifeq ($(BUILD_C_ANALYZERS),yes)
$(QUIET)$(call silent_on_success,Cleaning facebook-clang-plugins OCaml build,\
$(MAKE) -C $(FCP_DIR)/clang-ocaml clean)
endif
endif
$(QUIET)$(call silent_on_success,Cleaning infer OCaml build,\
$(MAKE) -C $(SRC_DIR) clean)
@ -571,11 +567,9 @@ endif
.PHONY: clean
clean: test_clean ocaml_clean
ifeq ($(IS_RELEASE_TREE),no)
ifeq ($(BUILD_C_ANALYZERS),yes)
$(QUIET)$(call silent_on_success,Cleaning facebook-clang-plugins C++ build,\
$(MAKE) -C $(FCP_DIR) clean)
endif
endif
$(QUIET)$(call silent_on_success,Cleaning Java annotations,\
$(MAKE) -C $(ANNOTATIONS_DIR) clean)

@ -25,10 +25,10 @@ fi
# We need to record the date that the documentation was last modified to put in our man
# pages. Unfortunately that information is only available reliably from `git`, which we don't have
# access to from other distributions of the infer source code, for instance our source
# releases. However, we do distribute the "configure" script in that case, so the idea is to bake
# this date inside "configure" so that it's available at build time. We do that by generating an m4
# macro that hardcodes the date we compute in this script for "configure" to find.
# access to from other distributions of the infer source code. Such source distributions should
# distribute the "configure" script too. The idea is to bake this date inside "configure" so that
# it's available at build time. We do that by generating an m4 macro that hardcodes the date we
# compute in this script for "configure" to find.
MAN_LAST_MODIFIED_M4=m4/__GENERATED__ac_check_infer_man_last_modified.m4
printf 'generating %s' "$MAN_LAST_MODIFIED_M4... "
if test -d '.git' ; then

@ -201,12 +201,10 @@ if [ "$ONLY_SETUP_OPAM" = "yes" ]; then
fi
echo "preparing build... " >&2
if [ ! -f .release ]; then
if [ "$BUILD_CLANG" = "no" ]; then
SKIP_SUBMODULES=true ./autogen.sh > /dev/null
else
./autogen.sh > /dev/null
fi
if [ "$BUILD_CLANG" = "no" ]; then
SKIP_SUBMODULES=true ./autogen.sh > /dev/null
else
./autogen.sh > /dev/null
fi
if [ "$BUILD_CLANG" = "no" ]; then

@ -77,10 +77,10 @@ BUILD_PYTHON_ANALYZERS=$enable_python_analyzers
AC_SUBST([BUILD_PYTHON_ANALYZERS])
AC_ARG_WITH(fcp-clang,
AS_HELP_STRING([--without-fcp-clang],
[do not use $CLANG_PREFIX/bin/clang to override the default compiler (default is to override if in an infer release)]),
AS_HELP_STRING([--with-fcp-clang],
[use $CLANG_PREFIX/bin/clang to override the default compiler (default is not to override)]),
,
with_fcp_clang=$is_release_tree)
with_fcp_clang=no)
AS_IF([test "x$enable_c_analyzers" = "xyes"], [
AC_MSG_CHECKING([whether to use the compilers in $CLANG_PREFIX/bin])
@ -103,9 +103,7 @@ AS_IF([test "x$enable_c_analyzers" = "xyes"], [
AC_ASSERT_PROG([shasum], [$SHASUM])
# cmake is required to build llvm+clang
AC_CHECK_TOOL([CMAKE], [cmake], [no])
AS_IF([test "x$is_release_tree" = "xno"], [
AC_ASSERT_PROG([cmake], [$CMAKE])
])
AC_ASSERT_PROG([cmake], [$CMAKE])
AC_ARG_ENABLE(ocamlopt-custom-cc,
AS_HELP_STRING([--enable-ocamlopt-custom-cc], [use CC in ocamlopt invocations]),
,
@ -163,8 +161,7 @@ gcc version >= 4.7.2 or clang version >= 3.1.
See the output of `./configure --help` to force the use of a different
C compiler.
Alternatively, you can checkout a release of infer with clang
pre-compiled here:
Alternatively, you can checkout a binary release of infer:
https://github.com/facebook/infer/releases/])
]

@ -40,9 +40,10 @@ rm -fr "$RELEASE_NAME"
./build-infer.sh --only-setup-opam
eval $(opam config env)
touch .release
./autogen.sh
./configure --prefix="/$RELEASE_NAME"
BUILD_MODE=opt make -j "$JOBS" install DESTDIR="$ROOT_DIR" libdir_relative_to_bindir=../lib
make -j "$JOBS" install BUILD_MODE=opt DESTDIR="$ROOT_DIR" libdir_relative_to_bindir=../lib
popd
if [ "$DRYRUN" = "no" ]; then

Loading…
Cancel
Save