[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/genrule/report.json
/infer/tests/build_systems/java_test_determinator/*.test /infer/tests/build_systems/java_test_determinator/*.test
/_release /_release
/infer-source
# generated by oUnit # generated by oUnit
/oUnit-all.cache /oUnit-all.cache

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

@ -257,7 +257,6 @@ clang_setup:
.PHONY: clang_plugin .PHONY: clang_plugin
clang_plugin: clang_setup clang_plugin: clang_setup
ifeq ($(IS_RELEASE_TREE),no)
$(QUIET)$(call silent_on_success,Building clang plugin,\ $(QUIET)$(call silent_on_success,Building clang plugin,\
$(MAKE) -C $(FCP_DIR)/libtooling all \ $(MAKE) -C $(FCP_DIR)/libtooling all \
CC=$(CC) CXX=$(CXX) \ CC=$(CC) CXX=$(CXX) \
@ -275,7 +274,6 @@ ifeq ($(IS_RELEASE_TREE),no)
LOCAL_CLANG=$(CLANG_PREFIX)/bin/clang \ LOCAL_CLANG=$(CLANG_PREFIX)/bin/clang \
CLANG_PREFIX=$(CLANG_PREFIX) \ CLANG_PREFIX=$(CLANG_PREFIX) \
CLANG_INCLUDES=$(CLANG_INCLUDES)) CLANG_INCLUDES=$(CLANG_INCLUDES))
endif
.PHONY: clang_plugin_test .PHONY: clang_plugin_test
clang_plugin_test: clang_setup clang_plugin_test: clang_setup
@ -558,11 +556,9 @@ endif
# Nuke objects built from OCaml. Useful when changing the OCaml compiler, for instance. # Nuke objects built from OCaml. Useful when changing the OCaml compiler, for instance.
.PHONY: ocaml_clean .PHONY: ocaml_clean
ocaml_clean: ocaml_clean:
ifeq ($(IS_RELEASE_TREE),no)
ifeq ($(BUILD_C_ANALYZERS),yes) ifeq ($(BUILD_C_ANALYZERS),yes)
$(QUIET)$(call silent_on_success,Cleaning facebook-clang-plugins OCaml build,\ $(QUIET)$(call silent_on_success,Cleaning facebook-clang-plugins OCaml build,\
$(MAKE) -C $(FCP_DIR)/clang-ocaml clean) $(MAKE) -C $(FCP_DIR)/clang-ocaml clean)
endif
endif endif
$(QUIET)$(call silent_on_success,Cleaning infer OCaml build,\ $(QUIET)$(call silent_on_success,Cleaning infer OCaml build,\
$(MAKE) -C $(SRC_DIR) clean) $(MAKE) -C $(SRC_DIR) clean)
@ -571,11 +567,9 @@ endif
.PHONY: clean .PHONY: clean
clean: test_clean ocaml_clean clean: test_clean ocaml_clean
ifeq ($(IS_RELEASE_TREE),no)
ifeq ($(BUILD_C_ANALYZERS),yes) ifeq ($(BUILD_C_ANALYZERS),yes)
$(QUIET)$(call silent_on_success,Cleaning facebook-clang-plugins C++ build,\ $(QUIET)$(call silent_on_success,Cleaning facebook-clang-plugins C++ build,\
$(MAKE) -C $(FCP_DIR) clean) $(MAKE) -C $(FCP_DIR) clean)
endif
endif endif
$(QUIET)$(call silent_on_success,Cleaning Java annotations,\ $(QUIET)$(call silent_on_success,Cleaning Java annotations,\
$(MAKE) -C $(ANNOTATIONS_DIR) clean) $(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 # 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 # 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 # access to from other distributions of the infer source code. Such source distributions should
# releases. However, we do distribute the "configure" script in that case, so the idea is to bake # distribute the "configure" script too. The idea is to bake this date inside "configure" so that
# this date inside "configure" so that it's available at build time. We do that by generating an m4 # it's available at build time. We do that by generating an m4 macro that hardcodes the date we
# macro that hardcodes the date we compute in this script for "configure" to find. # compute in this script for "configure" to find.
MAN_LAST_MODIFIED_M4=m4/__GENERATED__ac_check_infer_man_last_modified.m4 MAN_LAST_MODIFIED_M4=m4/__GENERATED__ac_check_infer_man_last_modified.m4
printf 'generating %s' "$MAN_LAST_MODIFIED_M4... " printf 'generating %s' "$MAN_LAST_MODIFIED_M4... "
if test -d '.git' ; then if test -d '.git' ; then

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

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

@ -40,9 +40,10 @@ rm -fr "$RELEASE_NAME"
./build-infer.sh --only-setup-opam ./build-infer.sh --only-setup-opam
eval $(opam config env) eval $(opam config env)
touch .release
./autogen.sh ./autogen.sh
./configure --prefix="/$RELEASE_NAME" ./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 popd
if [ "$DRYRUN" = "no" ]; then if [ "$DRYRUN" = "no" ]; then

Loading…
Cancel
Save