Skip to content

Commit 8bda23f

Browse files
jvillardfacebook-github-bot
authored andcommitted
[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
1 parent 69ead91 commit 8bda23f

File tree

7 files changed

+24
-41
lines changed

7 files changed

+24
-41
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ duplicates.txt
4444
/infer/tests/build_systems/genrule/report.json
4545
/infer/tests/build_systems/java_test_determinator/*.test
4646
/_release
47+
/infer-source
4748

4849
# generated by oUnit
4950
/oUnit-all.cache

INSTALL.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
# How to install Infer from source
22

3-
## Pre-compiled clang versions
3+
## Binary versions
44

5-
We provide a source release of Infer packaged with pre-build binaries
6-
for clang and facebook-clang-plugins for Linux and MacOS. We encourage
7-
you to use this release as compiling clang is time-consuming. Install
8-
the dependencies as explained in the next section, then follow the
9-
instructions in our [Getting
5+
We provide a binary release of Infer. We encourage you to use this
6+
release as compiling infer's dependencies is time-consuming. Follow
7+
the instructions in our [Getting
108
Started](http://fbinfer.com/docs/getting-started.html#install-from-source)
11-
page to compile and install Infer.
9+
page to install Infer.
1210

1311

1412
## Infer dependencies for MacOSX
1513

1614
Here are the prerequisites to be able to compile Infer on MacOSX. This
17-
is required to be able to [use the
18-
release](http://fbinfer.com/docs/getting-started.html) (faster), or to
19-
compile everything from source (see the end of this document).
15+
is required to compile everything from source.
2016

2117
- opam 1.2.2 (instructions [here](https://opam.ocaml.org/doc/Install.html#OSX))
2218
- Python 2.7
@@ -41,9 +37,7 @@ brew cask install java
4137
## Infer dependencies for Linux
4238

4339
Here are the prerequisites to be able to compile Infer on Linux. This
44-
is required to be able to [use the
45-
release](http://fbinfer.com/docs/getting-started.html) (faster), or to
46-
compile everything from source (see the end of this document).
40+
is required to compile everything from source.
4741

4842
- opam 1.2.2
4943
- Python 2.7
@@ -73,9 +67,7 @@ Replace `./build-infer.sh java` with `./build-infer.sh clang` to build
7367
the C and Objective-C analyzer from source. Beware that this command
7468
may take a really long time because it will compile a custom version
7569
of clang. This custom version is used by Infer to parse C and
76-
Objective-C source code. We encourage you to use [a
77-
release](https://github.com/facebook/infer/releases/) instead, which
78-
ship with clang already compiled.
70+
Objective-C source code.
7971

8072
See `./build-infer.sh --help` for more options, eg `./build-infer.sh`
8173
on its own will build the analyzers for both Java and C/ObjC.

Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ clang_setup:
257257

258258
.PHONY: clang_plugin
259259
clang_plugin: clang_setup
260-
ifeq ($(IS_RELEASE_TREE),no)
261260
$(QUIET)$(call silent_on_success,Building clang plugin,\
262261
$(MAKE) -C $(FCP_DIR)/libtooling all \
263262
CC=$(CC) CXX=$(CXX) \
@@ -275,7 +274,6 @@ ifeq ($(IS_RELEASE_TREE),no)
275274
LOCAL_CLANG=$(CLANG_PREFIX)/bin/clang \
276275
CLANG_PREFIX=$(CLANG_PREFIX) \
277276
CLANG_INCLUDES=$(CLANG_INCLUDES))
278-
endif
279277

280278
.PHONY: clang_plugin_test
281279
clang_plugin_test: clang_setup
@@ -558,11 +556,9 @@ endif
558556
# Nuke objects built from OCaml. Useful when changing the OCaml compiler, for instance.
559557
.PHONY: ocaml_clean
560558
ocaml_clean:
561-
ifeq ($(IS_RELEASE_TREE),no)
562559
ifeq ($(BUILD_C_ANALYZERS),yes)
563560
$(QUIET)$(call silent_on_success,Cleaning facebook-clang-plugins OCaml build,\
564561
$(MAKE) -C $(FCP_DIR)/clang-ocaml clean)
565-
endif
566562
endif
567563
$(QUIET)$(call silent_on_success,Cleaning infer OCaml build,\
568564
$(MAKE) -C $(SRC_DIR) clean)
@@ -571,11 +567,9 @@ endif
571567

572568
.PHONY: clean
573569
clean: test_clean ocaml_clean
574-
ifeq ($(IS_RELEASE_TREE),no)
575570
ifeq ($(BUILD_C_ANALYZERS),yes)
576571
$(QUIET)$(call silent_on_success,Cleaning facebook-clang-plugins C++ build,\
577572
$(MAKE) -C $(FCP_DIR) clean)
578-
endif
579573
endif
580574
$(QUIET)$(call silent_on_success,Cleaning Java annotations,\
581575
$(MAKE) -C $(ANNOTATIONS_DIR) clean)

autogen.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ fi
2525

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

build-infer.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,10 @@ if [ "$ONLY_SETUP_OPAM" = "yes" ]; then
201201
fi
202202

203203
echo "preparing build... " >&2
204-
if [ ! -f .release ]; then
205-
if [ "$BUILD_CLANG" = "no" ]; then
206-
SKIP_SUBMODULES=true ./autogen.sh > /dev/null
207-
else
208-
./autogen.sh > /dev/null
209-
fi
204+
if [ "$BUILD_CLANG" = "no" ]; then
205+
SKIP_SUBMODULES=true ./autogen.sh > /dev/null
206+
else
207+
./autogen.sh > /dev/null
210208
fi
211209

212210
if [ "$BUILD_CLANG" = "no" ]; then

configure.ac

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ BUILD_PYTHON_ANALYZERS=$enable_python_analyzers
7777
AC_SUBST([BUILD_PYTHON_ANALYZERS])
7878

7979
AC_ARG_WITH(fcp-clang,
80-
AS_HELP_STRING([--without-fcp-clang],
81-
[do not use $CLANG_PREFIX/bin/clang to override the default compiler (default is to override if in an infer release)]),
80+
AS_HELP_STRING([--with-fcp-clang],
81+
[use $CLANG_PREFIX/bin/clang to override the default compiler (default is not to override)]),
8282
,
83-
with_fcp_clang=$is_release_tree)
83+
with_fcp_clang=no)
8484

8585
AS_IF([test "x$enable_c_analyzers" = "xyes"], [
8686
AC_MSG_CHECKING([whether to use the compilers in $CLANG_PREFIX/bin])
@@ -103,9 +103,7 @@ AS_IF([test "x$enable_c_analyzers" = "xyes"], [
103103
AC_ASSERT_PROG([shasum], [$SHASUM])
104104
# cmake is required to build llvm+clang
105105
AC_CHECK_TOOL([CMAKE], [cmake], [no])
106-
AS_IF([test "x$is_release_tree" = "xno"], [
107-
AC_ASSERT_PROG([cmake], [$CMAKE])
108-
])
106+
AC_ASSERT_PROG([cmake], [$CMAKE])
109107
AC_ARG_ENABLE(ocamlopt-custom-cc,
110108
AS_HELP_STRING([--enable-ocamlopt-custom-cc], [use CC in ocamlopt invocations]),
111109
,
@@ -163,8 +161,7 @@ gcc version >= 4.7.2 or clang version >= 3.1.
163161
See the output of `./configure --help` to force the use of a different
164162
C compiler.
165163
166-
Alternatively, you can checkout a release of infer with clang
167-
pre-compiled here:
164+
Alternatively, you can checkout a binary release of infer:
168165
169166
https://github.com/facebook/infer/releases/])
170167
]

scripts/create_binary_release.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ rm -fr "$RELEASE_NAME"
4040

4141
./build-infer.sh --only-setup-opam
4242
eval $(opam config env)
43+
touch .release
4344
./autogen.sh
4445
./configure --prefix="/$RELEASE_NAME"
45-
BUILD_MODE=opt make -j "$JOBS" install DESTDIR="$ROOT_DIR" libdir_relative_to_bindir=../lib
46+
make -j "$JOBS" install BUILD_MODE=opt DESTDIR="$ROOT_DIR" libdir_relative_to_bindir=../lib
4647
popd
4748

4849
if [ "$DRYRUN" = "no" ]; then

0 commit comments

Comments
 (0)